Re: Using GdkPixmaps for storing static image data



On Thu, 22 Mar 2001, Havoc Pennington wrote:
> Well sure, but this is a non-issue for toolbars. GdkPixmap is intended
> for exactly this kind of server-side buffering when performance is
> important. For some little toolbar icons, there's no point
> complicating things.

Right. I had a feeling I'd got the wrong end of the stick. I was just worried
that GdkPixmap would become depreciated. Obviously, a non-issue.

> > One of the things I think Gtk is missing is a function to go from disk to
> > image. You can use the API to go via pixmaps, but that's a little
> > crazy :-)
> 
> In general I don't think there's too much reason to use images - 
> it's just too hard to handle all the visual-specific details.
> So Pixbuf is in that sense a GdkImage replacement.

Except that there's no concept of a shareable Pixbuf. When you are sending
large amounts of raster data from client-side to server-side on a regular basis
shared images make a large difference. I've no idea whether this is a common
requirement for applications. We need to do it when we start using complicated
transparancy algorithms which can't be done server-side. Perhaps we're a little
unusual in this regard in the GTK+ world.

> > One of my remaining jobs is to write a routine to copy from pixbufs to images
> > to solve this.
> 
> This code should already be in pixbuf_render_to_drawable(), it draws
> to a pixmap by first going to an image, then to the pixmap, IIRC.

Thanks, I missed that. May take me a while to understand the code :-)

Might I suggest that the API be expanded to provide a function to do this at
some point in the life of Gdk?

-- 
Ali Harlow                              Email: ali avrc city ac uk
Research programmer                     Tel:   (020) 7477 8000 X 4348
Applied Vision Research Centre          Intl: +44 20 7477 8000 X 4348
City University                         Fax:   (020) 7505 5515
London                                  Intl: +44 20 7505 5515




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