Transparent Images

Login to reply to this topic.
Fri, 2006-02-03 11:39
Joined: 2005-03-21
Forum posts: 45
Hi,

Can anyone tell me how to load transparent PNG images(without using mask). I think Symbian 6.1 doest not support this. Is there any other version which supports image formats other than BMP.

Thanks.
Prabhu.

Fri, 2006-02-03 11:53
Joined: 2005-08-20
Forum posts: 11
Re: Transparent Images
In 6.1 are other format (e.g jpg, gif) (class CPAlbImageViewerBasic) but imo for png you must yourself coding png loader.
Fri, 2006-02-03 14:33
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 1886
Re: Transparent Images
Starting from 7.0s, you can use CImageDecoder which is pretty convenient and should support most format the phone can handle (Gif, Jpeg, Png, etc...).

On 6.1, you can also check CMdaImageFileToBitmapUtility. There is a good usage exemple [there->http://www.newlc.com/article.php3?id_article=45].

Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Fri, 2006-02-03 15:11
Joined: 2005-03-21
Forum posts: 45
Re: Transparent Images
Hi All,

Thanks for the fast reply. Currently Iam using CMdaImageFileToBitmapUtility but this converts the PNG to BMP and hence the Transparency is lost. All the Transparent part of the image is drawn in white color. How ever i can use masking to get the transparent effect but is there any way to draw transparent image without using mask images.

Thanks.
Prabhu.
Wed, 2006-02-08 14:52
Joined: 2004-11-29
Forum posts: 1134
Re: Transparent Images
The way symbian implemented transparency support is based on masks.

There is no other way to do it in any version I know of that is on the market today.

So if you want to blit a 32 bit image with alpha channel (such as a transparent png), using the standard CFbsBitGc/CWindowGc functions, you'd need to "split" your image into two. One color bitmap, and one mask bitmap.
Its possible CImageDecoder can do this for you.

on 6.1 though, I think it only supports 1-bit masks, not 8-bit (EGray256) wich would be needed for blitting with alpha transparency.

So if you want to use 32 bit images with alpha on 6.1, you not only have to write your own image decoder, you also has to write your own blitting functions!
(This is though a good idea anyway, if you want performance. symbian bitgdi is unfortunatly quite slow)
Mon, 2006-02-20 11:35
Joined: 2005-03-21
Forum posts: 45
Re: Transparent Images
Hi,

Can you please tell me how to get the mask image dynamically. I will have only the original image and using this image i need to creat mask image and then use these two images to get transparency effect.

Thanks,
Prabhu.
Fri, 2007-12-28 05:56
Joined: 2007-12-28
Forum posts: 1
Image Masking

You can use Masking techniques to bring interesting effects in an Image by controlling which parts of an image need to be painted. You can apply an Image mask to an image. You can also use an image as a mask to achieve an effect that?s opposite from applying an image mask. Use color to mask parts of an image, which includes the technique referred to as chroma-key masking. Get the complex images masked with a ease and perfection. With an Image where hair is a complex criterion masking comes first. There are various types of masking -Simple and Detailed. SAI BPO Services Ltd (SBL) is adaptive in performing each type of masking whether Simple masking or Complex masking with ease and perfection. SBL as an Image masking service provider has a workflow over India, UK and Australia providing masking services to all the clients keeping TAT and Quality in mind. With the dedication and quality of workers at SBL; it is one among the Best Image masking service providers.
For more details:-http://www.saibposervices.com/Image_masking.aspx

Mon, 2008-01-07 09:25
Joined: 2004-11-29
Forum posts: 1134
Re: Transparent Images

Ignore the spammer.

You usually don't get the mask dynamically.
Usually you have a separate bitmap for the mask, created by an artist.

For some types of images it is possible to programatically decide what pixels that need masking and what does not, and in that way build up a mask bitmap.
But it depends on the image, and there is no way to do this generally for all types of images.

  • Login to reply to this topic.