jiayouxjh / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Save TGA, ICO file format #369

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Requested by EvanR@irc.freenode.org/#sdl.

http://www.organicbit.com/closecombat/formats/tga.html
We would save only the 8-bit variant with palette.
Loading is done by SDL_image, I think.

Original issue reported on code.google.com by pulkoma...@gmail.com on 6 Aug 2010 at 2:39

GoogleCodeExporter commented 9 years ago
Forgot : loader code (line 205) 
http://repo.or.cz/w/cantaveria.git/blob/HEAD:/video.c

Original comment by pulkoma...@gmail.com on 6 Aug 2010 at 2:45

GoogleCodeExporter commented 9 years ago
Also save ICO files. (req. by ilkke)

Original comment by pulkoma...@gmail.com on 15 Feb 2011 at 8:34

GoogleCodeExporter commented 9 years ago
Hi,

can you please add saving of ico files?
I,ve tryed loading some and some dosn't show an preview image and can't be 
loaded, if they can be loaded grafx2 hangs for quite a while but the ico is 
only 32x32 :P
grafx2-2.4wip1899-win32 on Windows 98 SE

... greetings HoraK-FDF

Original comment by HoraK-...@web.de on 15 Feb 2012 at 12:00

GoogleCodeExporter commented 9 years ago
When there is no preview but Grafx2 loads "something" anyway, it means the 
file-loading was supported by SDL_image, and apparently it has some ICO support 
but you can't choose which image it loads; the delay is when Grafx2 performs a 
color-reduction from 24bit (as decoded) to 256-color.

ICO format has changed over the years, nowadays it's a container for multiple 
images in several sizes, color-counts, and multiple file encodings (BMP, PNG). 
There's no way to support it cleanly in Grafx2 as it would require handling 
image collections instead of single image per file, and of course support RGB 
and RGBA images (24bit and 32bit) since all present-day icons will contain 
some. I really want to avoid a situation where a user opens an unknown ICO 
file, sees one of the 9 images, clicks "save", and it silently removes the 8 
other images from the file. 

For working on icon files I'd advise a freeware like Pixelformer. (It works 
very well on Win98 if you have KernelEx)

Original comment by yrizoud on 15 Feb 2012 at 2:16

GoogleCodeExporter commented 9 years ago
For the record, GIMP loads multiple images in ICO files as layers. Maybe we 
could do the same ?

Original comment by pulkoma...@gmail.com on 15 Feb 2012 at 5:20