Re: How does one overlay one image on top of another ?
- From: Bob Murphy <bob murphy access-company com>
- To: gtk-app-devel-list gnome org
- Subject: Re: How does one overlay one image on top of another ?
- Date: Tue, 01 Apr 2008 12:17:37 -0700
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
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:
] [Thread Prev