Re: pixbuf<->cairo_surface_t conversion



On Thu, 2010-09-02 at 19:24 -0400, Havoc Pennington wrote:
> We deprecate get_pixels() which is the only call that can force the
> old-style representation to be created. If you do use get_pixels(),
> what's going to happen is...

Deprecate¹ implies removal at either GTK 3.0 or GTK 4.0, right?

So I guess the question I have is "is there ever a legitimate usage to
get the individual pixels".

Our binding of this right now is:
http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gdk/Pixbuf.html#getPixels()

which is mostly used by us for testing; I couldn't begin to guess what
other people have used it for; I do know one crew that actually did some
image recognition work (feeding some other library from these byte[]).

We can kiss gdk_pixbuf_get_pixels() goodbye, no problem, but I'm just
curious what someone would replace it with... draw to a Cairo image
surface, save that to a PNG and then load it and... oh wait. :)

As usually happens across the language barrier, we had to copy the array
anyway, so I'm not really fussed where we get it from. Or, are we
advised to tell developers "no more access to an image's pixels"?

{shrug}

AfC
Sydney


¹ "deprecate" of course means "don't use this it's been replaced" or
just plain "don't use it" but in GTK during the long lifespan of 2.x
we've also used it to mean "we'd rather you didn't use it but it's still
ok"... because (until the last ~18 months) we were in
ain't-never-ever-gonna-remove-functions mode.

Now we're actually removing stuff! Who would have thunk it :)

I think there's some inconsistency in our library as a result of this. A
number of times over the last few months Javier has had his enthusiasm
pushed back when he's seen "rather you didn't use this", not known "it's
still ok", and thought it should be removed only to be told to leave it
alone.

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]