×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    73

    Converting bitmap images to SVG Tiny for application icons

    I came across this article which describes using bitmap images instead of SVG Tiny for Symbian application icons. As the article notes, the process unfortunately isn't straightforward, requiring editing of config files. It also requires you to manually create several images at different sizes, along with the "mask" images. And it's dependent on the SDK being used (Qt or the older SDKs). The Wiki describes a simpler process, though you still have to create the mask, and it only seems relevant to S60 3rd edition, and doesn't seem to apply to Qt.

    I thought it's worth pointing out that there's a relatively straightforward way to convert bitmap/raster images (PNG, JPEG, etc) to SVG Tiny:

    1. Install Inkscape (I'm testing with version 0.47).
    2. Go to File->Import, and import your image file. Note that the resultant SVG image will embed the image in the same image format, and SVG Tiny is only guaranteed to support JPEG and PNG. In practice, more may be supported (I've successfully tested this process on Symbian with JPEG, PNG and BMP files).
    3. Go to Extensions->Images->Embed Images (important, otherwise the SVG will only contain a link to the original file!)
    4. Go to File->Document Properties, and set the width/height to that of the image size (in pixels). You can find the image size by right clicking on the image and selecting Image Properties.
    5. Drag and move the image so it fits in the document area (you can edit manually with the X/Y values at the top, they should both be exactly 0).
    6. Save as "Plain SVG", and you're done! (Note, in practice, it seems than Symbian can happily read "Inkscape SVG" too, though strictly speaking this isn't a valid SVG Tiny file.)

    The advantage of using bitmap/raster images (via either of these methods) is that it avoids the whole problem of converting SVG to SVG Tiny - there appear to be no free methods that do this conversion. With this method, the images produced are compatible with SVG Tiny (SVG Tiny is a subset of SVG, and SVG Tiny supports the "image" tag that's used by this process; I've confirmed this with some test images through W3's validator - remember to set the Doctype to "SVG Tiny 1.1" if you use this, otherwise it just does a basic XML validation).

    I've tested this out on a few examples on my 5800 (using the Qt SDK), and it seems to work. Note that unlike the articles I link to, there appears to be no requirement for the images to be a specific size, as they'll be automatically resized. (Though obviously there's no point making them huge, as that just wastes disk space - presumably there's no need for them to be bigger than 86x70.) Remember to restart your phone to see new icons, as they are cached.

    Are there any flaws with this method? Any suggestions for improvement?

    (I know this isn't directly relevant to Qt, but I posted here as there don't yet appear to be instructions on using bitmaps for Qt, and I couldn't find a more appropriate forum.)
    Last edited by mdwh; 2010-07-04 at 16:40.

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    61

    Re: Converting bitmap images to SVG Tiny for application icons

    I've used Inkscape + the SVG tiny convertor in the SDK, as described here. The svg2svgt installer didn't work on Vista, I had to run it in compatibility mode.
    What I did is: pasted an image into Inkspace, ran a trace on it and saved as svg.

  3. #3
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    73

    Re: Converting bitmap images to SVG Tiny for application icons

    Following on from this idea, I wrote a simple command line utility for Windows to do the same thing in a single step - more details in this thread. Download from http://homepage.ntlworld.com/mark.ha...mage2svgt.html

  4. #4
    Registered User
    Join Date
    Oct 2009
    Location
    Bandung, Indonesia
    Posts
    36

    Re: Converting bitmap images to SVG Tiny for application icons

    Quote Originally Posted by mdwh View Post
    Following on from this idea, I wrote a simple command line utility for Windows to do the same thing in a single step - more details in this thread. Download from http://homepage.ntlworld.com/mark.ha...mage2svgt.html
    Thank you. I wished you'd have created it for cross-platform..
    Last edited by ceefour; 2010-11-28 at 19:01.
    [URL="http://qt-mobility.blogspot.com"]Hendy's Qt Mobility & Symbian Development Blog[/URL]

  5. #5
    Registered User
    Join Date
    Oct 2009
    Location
    Bandung, Indonesia
    Posts
    36

    Re: Converting bitmap images to SVG Tiny for application icons

    Quote Originally Posted by mdwh View Post
    ... I thought it's worth pointing out that there's a relatively straightforward way to convert bitmap/raster images (PNG, JPEG, etc) to SVG Tiny:

    1. Install Inkscape (I'm testing with version 0.47).
    2. Go to File->Import, and import your image file. Note that the resultant SVG image will embed the image in the same image format, and SVG Tiny is only guaranteed to support JPEG and PNG. In practice, more may be supported (I've successfully tested this process on Symbian with JPEG, PNG and BMP files).
    3. Go to Extensions->Images->Embed Images (important, otherwise the SVG will only contain a link to the original file!)
    4. Go to File->Document Properties, and set the width/height to that of the image size (in pixels). You can find the image size by right clicking on the image and selecting Image Properties.
    5. Drag and move the image so it fits in the document area (you can edit manually with the X/Y values at the top, they should both be exactly 0).
    ...
    Excellent steps!

    I use Inkscape 0.48 and there is an even shorter way:

    1. In Inkscape, click File > Open and open your PNG/JPEG file.
    (doing so makes the Inkscape document automatically resized in pixels to the bitmap file, and positioned properly with exact dimensions)
    2. Save as "Plain SVG", and you're done! (Note, in practice, it seems than Symbian can happily read "Inkscape SVG" too, though strictly speaking this isn't a valid SVG Tiny file.)
    [URL="http://qt-mobility.blogspot.com"]Hendy's Qt Mobility & Symbian Development Blog[/URL]

Similar Threads

  1. Installation of SVG to SVG Tiny converter fails
    By nede in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2010-05-19, 02:37
  2. SVG Pony - the SVG Tiny converter is now available
    By grekker in forum News, Announcements and Job Listings
    Replies: 0
    Last Post: 2010-01-05, 20:33
  3. I need an SVG Tiny Editor
    By angusrose in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2009-12-28, 21:53
  4. How to create transparency icons using SVG images
    By mrautane in forum Symbian User Interface
    Replies: 1
    Last Post: 2007-06-08, 21:11
  5. Converting from SVG to Bitmap using CImageDecoder
    By Tatanka.nbr1 in forum Symbian C++
    Replies: 0
    Last Post: 2006-05-09, 12: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
  •