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





--- On Mon, 11/16/09, Niels Roest <ni...@directfb.org> wrote:

From: Niels Roest <ni...@directfb.org>
Subject: Re: [directfb-dev] Image and alpha mask problem
To: "Jack W" <ji...@yahoo.com>
Cc: directfb-us...@directfb.org
Date: Monday, November 16, 2009, 12:57 PM

Hi Jack,

SetSourceMask has unfortunately no software fall-back option.
This means: only supported if your graphics card supports this in hardware, 
currently seems to be limited to the Radeon series.

hth
Niels

Jack W wrote:
> Hi all,
> 
> I want to get the semi-transparent image by using an alpha mask image (png) 
> on a normal image (jpg). My code is very simple. All the materials and a 
> screen shot are attached. I used SetSourceMask. But I cannot see the 
> transparent image. Can anyone help me?  My system: CentOS and DirectFB 1.4.
> 
> Thanks a lot.
> 
> -Jack
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> directfb-dev mailing list
> directfb-dev@directfb.org
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev


-- 
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------" 



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

Reply via email to