This is possible with Pixbuf. The standard ruby-gnome distribution has
an example for that if I recall correctly.
More precisely, it has an example of overlaying an image over
checkerboard.
The composite! method (and its description) is broken.
While the description mentions a check_size parameter it’s not
included in the parameter list.
The check_size parameter (or whatever is on its expected position) can
be set to zero which leads to gtk looping.
There is no way to set the dest_x and dest_y shown in the operation
diagram.
The operation diagram shows the apple image applied with transparency
but actual method puts black background in place of the image’s
transparent pixels.
The check1 and check2 colors are integers but the meaning of the
integers is not detailed. I set them to zero which might be
responsible for the black background but sane color meanings values
would assign full transparency to 0.
The second method call in the composite example actually does overlay
an image with transparency as can be seen when the second and third
call are swapped and the image not replaced with empty one in between
but why it is so is somewhat of a mystery as the method parameters
aren’t really described anywhere nor does the method match any C or
python Pixbuf method.
The check1 and check2 colors are integers but the meaning of the
integers is not detailed. I set them to zero which might be
responsible for the black background but sane color meanings values
would assign full transparency to 0.
The example achieves transparency be leaving out the checkerboard
arguments altogether.
Using that I can construct a combined image like this: