ENIGMA Forums

Sharing is caring => Graphics and Video => Topic started by: Goombert on January 26, 2014, 03:50:27 am

Title: converticon.com issues
Post by: Goombert on January 26, 2014, 03:50:27 am
Thanks to sorlok this is resolved and is included in LGM 1.8.6
https://github.com/IsmAvatar/LateralGM/pull/146

You can now use converticon icons.

* IGNORE THIS POST IT HAS BEEN FIXED *

I just want to write this post up explaining why converticon.com should not be used to convert large icons and images to and from the ICO format.

Upon discovering TKG's icon woes in the following topic, I discovered that the website does not adhere to the ICO file specification.
http://enigma-dev.org/forums/index.php?topic=1700.msg16563#new
The ICO file specification states that the 7th byte will be the width of the image when the format is BMP, if the format is PNG the next part is simply the PNG header.
http://en.wikipedia.org/wiki/ICO_%28file_format%29

When I investigated I found out that every ICO file with a size layer larger than 192x192 exported from converticon.com will be essentially broken.

The following is a screenshot of me viewing a 192x192 ICO file from converticon.com which does match the ICO specification and the width is reported correctly.
(http://i.imgur.com/f6G4F6a.png)
The following is a screenshot of me viewing a 512x512 ICO file from converticon.com which does NOT match the ICO specification and the width is reported as 0.
(http://i.imgur.com/FM9hwqG.png)
The following shows what a 256x256 ICO file using PNG looks like. The 7th byte is 0 but that is because that portion starts the PNG header. This header clearly does not match the corrupted converticon.com version. So that rules out the possibility that LGM couldn't load as a result of the icon using the PNG format, because LGM loads this one fine.
(http://i.imgur.com/8bNpihu.png)

I do not care if Windows and Studio can work with these corrupted ICO files or not. LateralGM will not support them, because they do not follow the specification and there is no way to tell exactly how to read them. Please do not use this site to convert large icon files, there are standards in computing for a reason.

For proof that LGM loads 512x512 ICO files when they are in the correct format, try to use the following icon and it should work fine.
https://www.dropbox.com/s/4y9ygbm7mqai6fy/DeathStar512.ico

A good image editing software is Paint.NET it is freeware and has a lot of plugins.
http://www.getpaint.net/
There is also GIMP.
http://www.getgimp.com/
Both of these tools can be used to export ICO files properly.
Title: Re: Do Not Use converticon.com
Post by: Goombert on September 09, 2014, 03:11:42 pm
Looks like sorlok has dug around and found the cause.
https://github.com/IsmAvatar/LateralGM/issues/143
Title: Re: Do Not Use converticon.com
Post by: sorlok_reaves on September 09, 2014, 03:54:33 pm
Yeah, from what I can tell, Windows and Linux BOTH ignore the width/height of icons and use the width/height of the actual images embedded in the icons. I'll get back to you after I do a few more tests (on older versions of Windows, etc.).

Nobody's as good at designing a standard and then immediately ignoring it than Windows.