Re: inline pixbufs



on 7/26/00 10:55 AM, Havoc Pennington at hp@redhat.com wrote:

> I'm happy to cut-and-paste to fix the Bonobo lib if the Bonobo
> maintainers want that (it's a 5-minute task).

Sounds great! I can't really speak for the Bonobo maintainers (wish I
could), but I sure hope they want it. (Gene Ragan and I added the GdkPixbuf
code Bonobo because we needed it for Nautilus.)

Are you sure it's really a 5-minute task? Bonobo requires a flatten as well
as an unflatten. And there's also the [admittedly tiny] issue of
CORBA_sequence_CORBA_octet_allocbuf vs. malloc.

> You can't get an unusable image AFAIK. You could get a slow one, yes;

Again my Macintosh experience is showing. On the Macintosh circa 1984 an odd
row stride was illegal.

> I would suggest that make-inline-pixbuf always output an image aligned
> for the platform it's compiled on, and that
> gdk_pixbuf_new_from_inline() pick an optimal rowstride iff copy_pixels
> is TRUE.

Sounds excellent.

> So, concretely: I will edit the current code to be sure the format in
> the byte stream is one that GdkPixbuf actually supports, which right
> now means it has to be 24-bit RGB with optional alpha channel.
> An unsupported format will result in a NULL return value.

Sounds good.

I look forward to helping out by reviewing your code to see if I can spot
any missing cases, since there are many interactions between the various
parameters.

> I'll also add a "length" arg to gdk_pixbuf_new_from_inline() which can
> be -1 to mean "just trust the length in the inline data" and can be
> passed in from the CORBA byte array in the Bonobo case.
> 
> Will that work?

I think it will work fine.

    -- Darin





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