Re: [java-gnome-hackers] Covarage of Pixbuf constructor using byte[] and does scaling
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2009-06-21 23:14:51
|
On Sun, 2009-06-21 at 14:42 +0300, Serkan Kaba wrote: > Actually attaching the bundle. Serkan and I chatted about this last night on IRC. Essentially my feedback to him was "yes, duplication is bad, but hacky attempts to avoid duplication are worse." So I'll certainly accept this patch. ++ I just looked at gdk_pixbuf_new_from_stream_at_scale() in devhelp, and noticed that it takes -1 for width and height. So maybe we can implement both Pixbuf(byte[]) and Pixbuf(byte[], int, int, boolean) using the same code path, but using GdkPixbufOverride.createPixbufFromArrayAtScale(data, -1, -1, false); for the original method? I looked at the code in GTK's gdk-pixbuf/gdk-pixbuf-io.c, however, and I'm not actually sure that's a good idea. The at scale code paths do considerable extra work that we'd want to avoid. But I thought I'd mention the possibility for you to think about. AfC Sydney |