I solved this problem after few tests. I used SetPixelFormat to set ARGB when 
the image surface was created, then modified the alpha value of each pixel. The 
transparency works. Sorry to bother you guys.

-Jack



--- On Tue, 11/17/09, Jack W <ji...@yahoo.com> wrote:

From: Jack W <ji...@yahoo.com>
Subject: Re: [directfb-dev] Image and alpha mask problem
To: directfb-us...@directfb.org, directfb-dev@directfb.org
Date: Tuesday, November 17, 2009, 8:51 PM

Hi Niels,

I created a surface with a jpg file. But I found its pixel format was 24bits 
RGB. There was no alpha, so I could not modify the alpha on this jpg surface by 
using Lock/Unlock.   (But the pixel format is 32bits ARGB if the loaded image 
is png.) 

My question is how to convert the jpg surface to 32bits (ARGB) surface so that 
I can modify the transparency of the jpg image when I blit it on primary 
surface.

Thanks a lot!

-Jack





      
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to