×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    226

    Creating icons with PNG image

    Hi,
    I need to create the icons out of PNG files in S60 5th edition C++ SDK. Is it possible with the mifconv ? If not is there any other way other than using the CImageDecoder?

    Thanks & Regards,
    Jinu

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Creating icons with PNG image

    mifconv takes as input SVG, SVGB or BMP files (or any random mix of such files). Convering the PNGs to BMP is not an issue so yes, you can create such icons. The output will be an mbm file with the raster icons inside. Make sure to inclide also mask images if needed.

    If you need however to create the icons at run-time then CImageDecoder is your only option.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    226

    Re: Creating icons with PNG image

    I need to create the bitmaps during the compile time only. So how can i convert the PNG's to bitmap?

    Thanks & Regards,
    Jinu

  4. #4
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    226

    Re: Creating icons with PNG image

    Hi ltomuta,
    I read that the PNG can be converted to CFbsBitmap by CImageDecoder. Is there any other method to convert the PNG to bitmap? Is there any way I can use the PNG image for Application icon? I m using S60 5th edition C++ SDK.

    Thanks,
    Jinu

  5. #5
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Creating icons with PNG image

    Microsoft's Paint can open PNG images and save them as bitmaps and so can any other image handling tool that I know off. Try IrfanView for example if Paint is not good enough.

    For icons that are to be added to your application at compile time I strongly recomend however to use SVGs. Just throw away the PNGs and create vectorial graphics for your app.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  6. #6
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    226

    Re: Creating icons with PNG image

    Hi ltomuta,
    Thanks alot for the reply. But the issue is that I am an application programmer and i was given PNG images even for application icon. Converting to bitmap is fine, but as you know size of a bitmap is far more compared to PNG images.This will increase the binary size too. I read from some posts on the forum that there are no good tools available which can convert PNG's to SVG. Creating SVG needs great skill too. So I am in a confused state. Looking forward for ur suggestions.

    Thanks,
    Jinu

  7. #7
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Creating icons with PNG image

    The bitmaps will not be stored as such on te device, you will build an .MBM with them and it can only contain bitmaps so basically you have no choice, you have to convert the file.

    You can try to fake SVG usage by embedding the PNG inside SVG tags but that will bring you more problems than benefits.

    You should notify your app's designer about the realities of aplication development and ask him/her to adopt real SVGs for this and the next projects. It might require new tools/skils but that's the way to go forward.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  8. #8
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    226

    Re: Creating icons with PNG image

    Thanks a lot for the reply. Actually what is the advantage in using the SVG files as such over normal bitmaps? Anyways mifconv converts the svg to bitmap and save in an .MBM file

    Thanks,
    Jinu
    Last edited by jinuthomas; 2009-03-20 at 14:06.

  9. #9
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    226

    Re: Creating icons with PNG image

    Hi ltomuta,
    Looking forward for your reply.

    Thanks,
    Jinu

  10. #10
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Creating icons with PNG image

    mifconf converts SVG files to ... *.mif, and bitmap files to *.mbm.

    At run time, you load a "frame" from either *.mbm or *.mif [using the same APIs], rezize it according to your needs (mandatory for SVGs loaded from *.mif as they are still pure XML data and only rendered as bitmap after resize) and then you blit it on the screen. The diference (and SVG's advantage) is in the resizing step as a bitmap does not resize well while the SVG, being vectorial, scales perfectly to any size.

    Compare for example the quality of the two graphic objects animated at http://www.streamhead.com/vector-vs-...-png-in-flash/
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. Problem in creating image from InputStream
    By deepanjanghosh16 in forum Mobile Java General
    Replies: 1
    Last Post: 2006-12-19, 12:47
  2. Using Icon as Image
    By korakotc in forum Symbian
    Replies: 6
    Last Post: 2006-02-13, 19:34
  3. HELP: Mutable Image to Immutable Image?
    By rj_cybersilver in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2005-03-26, 09:58
  4. Loading Image data from 'raw' bytes
    By LongSteve in forum Mobile Java General
    Replies: 2
    Last Post: 2002-11-20, 17:38
  5. I want to add a png image to a List..
    By nmostafa in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2002-09-26, 10:43

Posting Permissions

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