Can u tell me how you masked a bitmap image. did u use the bmconv tool to convert a masked image to a mbm file and used the bitbltmasked() to render the image and the mask.
was the mask a monochrome type image. please tell me how u did it. I actually want to display a transperant png, image.
Either you use an EGray2 (monochrome) mask, and the mask will then either skip or use the pixel from the image depending on the mask color. That is, either fully transparent, or fully opaque
Or you use an EGray256 (grayscale) mask, and then the image will be alpha-blended useing this mask as alpha channel. That is, pixels can also be semi-transparent.
You can either split your png into a mask bitmap and a color channel bitmap with some pc tool of your choise, and then make an MBM containing these two bitmaps, or you can use CImageDecoder to load the PNG on the device.
Edit: Seeing your other post... To get CImageDecoder to output a mask bitmap too, create it with EAllowGeneratedMask, and give it a mask bitmap to output too also, in your call to convert.
gmsk19:
why? That will take up more file space without any gain. (well, except not having to use CImageDecoder)
png files are compressed, and there are decoders available to decode them to two cfbsbitmaps, one for the color channels, and one for the mask/alphachannel.
For Applications that are not bulky you can go with bitmaps instead fo pngs and you can further reduce the size of masks by going for monochrome bitmaps
Forum posts: 1246
Forum posts: 43
virtual void BitBltMasked(const TPoint& aPoint,const CFbsBitmap* aBitmap,const TRect& aSourceRect,const CFbsBitmap* aMaskBitmap,TBool aInvertMask);
The first is the image it self, and the second is monocrome mask image..
aMaskBitmap is the masked image no?
so how can i mask the image?
Forum posts: 128
just fill black color in the area which is covered by the image.
Forum posts: 105
as sunny says...just above me...
if u want to make the mask then follow this simple step....
if u hv circle in ur actual image..
then in ur mask image this circle must be black having same area as actual....
Best Regards
CodePupil
Thanks and Regards
CodePupil
__________________________
You are I and I am he .. !!
Forum posts: 11
Can u tell me how you masked a bitmap image. did u use the bmconv tool to convert a masked image to a mbm file and used the bitbltmasked() to render the image and the mask.
was the mask a monochrome type image. please tell me how u did it. I actually want to display a transperant png, image.
Please give me any pointers.
Forum posts: 1246
Either you use an EGray2 (monochrome) mask, and the mask will then either skip or use the pixel from the image depending on the mask color.
That is, either fully transparent, or fully opaque
Or you use an EGray256 (grayscale) mask, and then the image will be alpha-blended useing this mask as alpha channel. That is, pixels can also be semi-transparent.
You can either split your png into a mask bitmap and a color channel bitmap with some pc tool of your choise, and then make an MBM containing these two bitmaps,
or you can use CImageDecoder to load the PNG on the device.
Edit: Seeing your other post... To get CImageDecoder to output a mask bitmap too, create it with EAllowGeneratedMask, and give it a mask bitmap to output too also, in your call to convert.
Forum posts: 159
I request u to paste the complete code to display the masked png image...
Thanks in advance...
Brajesh...
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++
Forum posts: 99
It is better to use bitmaps for Images instead of PNGs and Use BitBltMasked() to draw using the image and its mask
Shashi Kiran G M
Forum posts: 1246
gmsk19:
why? That will take up more file space without any gain. (well, except not having to use CImageDecoder)
png files are compressed, and there are decoders available to decode them to two cfbsbitmaps, one for the color channels, and one for the mask/alphachannel.
Forum posts: 99
For Applications that are not bulky you can go with bitmaps instead fo pngs and you can further reduce the size of masks by going for monochrome bitmaps
Shashi Kiran G M