gdk_pixbuf_composite



I think gdk_pixbuf_composite is broken in a serious way.  The offsets don't
seem to work properly and compositing onto a pixbuf with alpha seems to cut
holes rather than paste onto the destination.  I'm trying to combine a
partially transparent foreground pixbuf and a background pixbuf, which also
has alpha since the image is not a rectangle.  Here's the way I'm calling
gdk_pixbuf_composite

  gdk_pixbuf_composite(scratch,pixbuf,
                       0,0,
                       gdk_pixbuf_get_width(scratch),
                       gdk_pixbuf_get_height(scratch),
                       0,0,1,1,GDK_INTERP_NEAREST,255);

Scratch and pixbuf are both of the same size.  The background was previously
copied onto pixbuf using gdk_pixbuf_copy and several parts of the foreground
were assembled onto scratch using gdk_pixbuf_copy_area.  The result is that
holes are cut out of pixbuf where scratch is non-transparent.  If I try to
composite each part directly onto the background (pixbuf), the offsets get
all messed up.

-- 
Geoffrey Reedy                   Student Network System Administrator
vader21@imsa.edu                    Illinois Math and Science Academy

"Unix-to-Unix Copy Program;" said PDP-1.  "You will never find a more
wretched hive of bugs and flamers.  We must be cautious."
				-- DECWARS




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