Re: How does one overlay one image on top of another ?

As an alternate, how might I generate a new pixbuf with the 2nd image's bits replacing the
1st image's bits at a specific location ? (I'm sure Gimp can do this, I'm just curious as
to how it manages this...)

gdk_pixbuf_composite() does this. If the source pixbuf has an alpha channel, I believe it also does alpha-compositing on the colors. Here's a URL:

If you want to do something fancier, you can analyze and/or modify the pixels comprising a GdkPixbuf. I've used this general approach to do some unusual things with raster images in pixbufs. For some simple sample code, take a look at example 1 in the following URL:

- Bob

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