Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,359

    How to make transparent image

    hi,
    I am trying to make a part of an image as transparent so that I can see the background image from that part.


    Please suggest me how do I proceed.

  2. #2
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: How to make transparent image

    The transparency of image is depend upon its Alpha blending value, so try to set it in a Image maker Tools like Photoshop.
    Regards
    $-Nitesh-$

  3. #3
    Regular Contributor
    Join Date
    Jul 2008
    Location
    Delhi, India
    Posts
    285

    Re: How to make transparent image

    use masked image

    there is some example in pre-3rd SDKs.

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: How to make transparent image

    it all depends on how you want to package to image if you want to use a static image then you can use a trasparent image in the form of MBM/svg(mif) if you download from your server then you can put the transparent images in format of png . and if you no control on your downloaded images then you have to programmatically do the transparency.

    in any case all 3 cases have corresponding code in wiki.

  5. #5
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,359

    Re: How to make transparent image

    which example are you talking about

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: How to make transparent image

    Quote Originally Posted by somnathbanik View Post
    which example are you talking about
    have you seached wiki for Transparent . image decoder etc ?

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,791

    Re: How to make transparent image

    S60Ex\Graphics. It is present in all S60 1st and 2nd edition SDK-s, and it is re-introduced in S60 3rd FP1 (so it is missing from S60 3rd and S60 3rd MR).

  8. #8
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,359

    Re: How to make transparent image

    Hi,
    I tried photoshop and made a transparent image. when I draw the image over another image the area that I made transparent is comming to be white, I can't see the image behind it through that transparent area. Is it beause of the system API. Is there anyway i could made a part of the image as transparent using Symbian API.


    Please suggest me.

  9. #9
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,359

    Re: How to make transparent image

    HI,
    I tried photoshop and make a part of an image as transparent. But when I draw it over another image the portion that I have made transparent is comming to be white. I can't see the image behind it through that transparent area. Is it because of the Symbian API. is there anyway I could make a part of an image as transparent and draw it?


    Please suggest me.

  10. #10
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    114

    Re: How to make transparent image

    Hi ,

    This works for me.
    i have done this with Bitmap. make image which ever u want , make it mask and colour the portion with white colour which u want to make transparent and rest portion of mask is black .save mask as monochorome. while including mask in mbm give color 8.
    after this you will able to get transparent image.



    CFbsBitmap *bitmap, *mask;
    AknIconUtils::CreateIconL(bitmap, mask, KIPfile,
    EMbmcontrolMoveimage, EMbmcontrolMoveimage_mask);
    AknIconUtils::SetSize(bitmap, TSize(20, 20), EAspectRatioNotPreserved);
    AknIconUtils::SetSize(mask, TSize(20, 20), EAspectRatioNotPreserved);


    and in Draw

    TRect itemRect = TRect(TPoint(0, 0), TSize(20, 20));
    gc.BitBltMasked(ImageLocation, bitmap, itemRect,
    mask, EFalse);
    Last edited by purnima.attarsingh; 2010-08-07 at 10:54. Reason: ghgg

  11. #11
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,359

    Re: How to make transparent image

    Hi,
    what are EMbmcontrolMoveimage and EMbmcontrolMoveimage_mask. I have a bitmap now please guide me with the code , Lets say my image name is background.png.

  12. #12
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,359

    Re: How to make transparent image

    Hi,
    what are EMbmcontrolMoveimage, EMbmcontrolMoveimage_mask, Let say i have an image back.png. Please guide me with the code for this image to make a portion transparent.

  13. #13
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,359

    Re: How to make transparent image

    Hi,
    what are EMbmcontrolMoveimage, EMbmcontrolMoveimage_mask, let say I have an image back.png, and after conversation the bitmap is iBitmap. Now please guide me with the code for making a portion as transparent.

  14. #14
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,359

    Re: How to make transparent image

    Hi,
    What are EMbmcontrolMoveimage, EMbmcontrolMoveimage_mask, let say i have an image back.png and the bitmap is ibitmap. Now please guide me with the code for making a portion as transparent.

  15. #15
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,359

    Re: How to make transparent image

    Hi,
    Let say I have an image image.png and the bitmap is ibitmap. Now please guide me with the code for making a part as transparent.

Similar Threads

  1. How to make QListWidget transparent
    By tfjy2008 in forum Nokia N9
    Replies: 5
    Last Post: 2010-05-26, 12:45
  2. how to make cba transparent
    By krushived in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-04-28, 14:07
  3. How to make background transparent?
    By oslario in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-08-04, 07:56
  4. how to make transparent graphics
    By chizuoka in forum Mobile Java General
    Replies: 3
    Last Post: 2003-04-24, 09:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×