Hello,

I am trying to use kaa.imlib2.Image to create an image that is opaque
at the top and becomes linearly transparent towards the bottom. My
plan was to load an image and blend the same image with increasing
levels of alpha for each scanline. But that is not producing the kind
effect I want. Actually it is doing nothing. Here is the code I am
using. Can someone help me please.

        image = imlib2.Image(item_image)
        blend_image = imlib2.Image(item_image)
        for i in range(image.height):
          c = 255 - 255 * i / image.height
          image.blend(blend_image, (0, i), (-1, 1), (0, i), (-1, 1), c, True)

What is wrong with the code? The only other solution I can think of is
to read each pixel and set the alpha level manually with increasing
levels of alpha as I move down the image. But this is very slow. Is
there a fast way to do it?

Thanks
Chandan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to