gdk_pixbuf_composite issues



Salut!

I'm trying to reproduce a very popular image effect these days, where
the image seems to levitate above a reflective ground.

So I build a GdkPixbuf and I first render my image on it (which is
scaled to fit inside). Then I have to draw the reflection, which is
the same image but flipped vertically. To do so I use
gdk_pixbuf_composite with a yscale parameter to -1.0.

Here is what this does:

http://kris.dehais.free.fr/bazar/nearest_and_hyper_(correct).jpg

I get different result with different GDK_INTERP value: tiles and
bilinear fail to a black rectangle, while nearest and hyper succeed.

http://kris.dehais.free.fr/bazar/tiles_and_bilinear_(long_to_generate).jpg

Is this something known ?

Then:
As far as there is no rescaling, I don't need 'hyper' interpolation,
but if I want to shrink the reflection to make it a little bit more
realistic, then yscale will have != -1.0 values. When I implement
that, tiles and bilinear fail again, nearest work as well as it can
and hyper produces giltches (removed fading for clearness)

http://kris.dehais.free.fr/bazar/rescale+nearest.jpg
http://kris.dehais.free.fr/bazar/rescale+hyper_(glitches_on_cheek).jpg

Are there any known limitations of gdk_pixbuf_composite I am falling into ?


Thanks for clues,
Christophe.



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