Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2008

    Changing color of text in bmp image

    Hi all,

    I am developing an application where i need to display bitmap image on the screen. The image has some text content in the black color. I need to change the text color of that image using some different color.
    I mean i need to load bitmap palette of the image. So that it will provide me the colors used in the image.
    and Suppose i get black color in it, i need to change that black color with some different color say Red.
    So that after doing this if i load that bitmap i should see that image on screen with text content(or whatever content) that was black earlier with Red color.

    IS this can be done in symbian?

    Any help will be appreciated.
    Last edited by amey_kulkarni; 2009-01-09 at 10:55.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: Changing color of text in bmp image

    In Symbian C++, a bitmap is represented by a CFbsBitmap object, if you check it in the SDK Help, you will see that it allows access to the palette. However in reality, palettized bitmaps are rarely used (I am not sure if they would even work on actual devices), so it is more likely that you should do the modification via pixel-level "image processing". Check TBitmapUtil class.
    For loading bitmaps you can either use Symbian's native bitmap format, .mbm (CFbsBitmap::Load is able to load such image directly), or use CImageDecoder for decoding most popular image formats (like JPEG, and some others). Usage is documented in the SDK Help, but you can also find related articles in the Wiki.

Similar Threads

  1. [PyS60 1.4.4] Font on image example
    By cyke64 in forum Symbian
    Replies: 0
    Last Post: 2008-06-29, 02:15
  2. Adding text to image:(
    By newbie2201 in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2008-06-18, 11:17
  3. Pixelated Text SVG Image
    By sam@speedalert.com.au in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2008-05-20, 02:37
  4. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 06:34
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

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