View Full Version : How to create base64 string for icon?

4 Aug 2010, 11:50 PM
Hey guys,

I have some custom icons I want to add to the css files, but I'd like to do that like the original icons from Sencha Touch with a base64 string.

I tried to convert a PNG-24 file into a base64 string and use that in the app, but it becomes all blurry...

Any tips on creating them?

5 Aug 2010, 9:48 AM
Heres an online conversion utility: http://websemantics.co.uk/online_tools/image_to_data_uri_convertor/.

Here is a good writeup about it: http://css-tricks.com/data-uris/

Hope that helps.

5 Aug 2010, 11:25 AM
@cnelissen thx for the info! I already converted the images to strings like described but because the images get resized to 28x28 pixels by the Sencha css this causes blurring. The original images are 48x48 pixels - at least, the ones that are in the source folder of the sencha touch download.

I guess the resizing doesn't happen on an iPhone 4 because of the higher resolution...