Re: inline pixbufs
- From: Havoc Pennington <hp redhat com>
- To: Federico Mena Quintero <federico helixcode com>
- Cc: Darin Adler <darin eazel com>, <gtk-devel-list gnome org>
- Subject: Re: inline pixbufs
- Date: 26 Jul 2000 17:12:53 -0400
Federico Mena Quintero <federico@helixcode.com> writes:
> Havoc Pennington <hp@redhat.com> writes:
>
> > + if (rowstride < width)
> > + return NULL; /* bad data from untrusted source. */
>
> This does not handle bits_per_pixel != 8.
>
Explain in more detail. ;-) What are rowstride and width in that case?
> We should lose the copy_pixels. People can just do
>
> GdkPixbuf *p1, *p2;
>
> p1 = gdk_pixbuf_new_from_inline (inline_data, -1);
> p2 = gdk_pixbuf_copy (p1);
> gdk_pixbuf_unref (p1);
>
> if they want a read/write pixbuf or if they are getting the inline
> data from the Bonobo pipe. Besides, gdk_pixbuf_copy() can be smarter
> about compressing/expanding rowstrides and there is no reason to
> duplicate that functionality. The idea is that pixbufs are read-only
> unless you know what you are doing.
>
Mhm, I like forcing them to think about the "copy_pixels" issue. Plus,
the above is sort of inconvenient.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]