I have been writing a program in c that uses the gdk pixbuf composite function to overlap two PNG images.
The eventual aim is to have a base PNG image with another PNG that contains alot of transparent pixels on top meaning that only a portion of the original image is visible.
The code below displays the base image corrently but shows the second pixmap with the right dimensions but only contains a single color rather than the contents of the second PNG.
Interestingly the color coresponds to the first few pixels of the second PNG.
I'm not very experienced with GTK so i don't really understand if composite is even the right function to use.
any help with displaying the second PNG would be much apreciated
pixbuf1 = gdk_pixbuf_new_from_file("SA.PNG", NULL);
pixbuf2 = gdk_pixbuf_new_from_file("RA2.PNG", NULL);
gdk_pixbuf_composite(pixbuf2, pixbuf1,100, 100, 220, 210, 50, 300,440, 440,GDK_INTERP_BILINEAR,255);
image = gtk_image_new_from_pixbuf(pixbuf1);