goldenXcode / grafx2

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

File format support for .GOD files by Reservoir Gods Godpaint #499

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

would it be possible to add support for the Godpaint fileformat?
(Godpaint is a Hicolor pixel art program for the Atari Falcon 030.)

The format is very simple:

+0 uint8_t 'G'
+1 uint8_t '4'
+2 uint16_t width in pixels
+4 uint16_t height in pixels
+6 pixel data for each row, each pixel is uint16_t

All words are in BIG ENDIAN format. The pixel format for each 16bits chunky 
pixel is as follows:

RRRRRGGGGGXBBBBB

Simple C code to put it together:
    Uint8 r,g,b;
    Uint16 pixel;

    r=((r & 0xFF) >>3);
    g=((g & 0xFF) >>3);
    b=((b & 0xFF) >>3);

    pixel=0x0000;

    pixel=(((r<<5)|g)<<6)|b;

I have attached a sample file with known "web palette" as gif and its rendering 
as a .GOD file with 320x240. I have confirmed on my Falcon that it looks ok.

Note that due to the 5bits used for RGB, full RGB information of a picture 
might get lost.

Regards,
Simon Sunnyboy / Paradize

Original issue reported on code.google.com by marndt@final-memory.org on 4 Aug 2012 at 5:15

GoogleCodeExporter commented 9 years ago
I forgot the attachment.

Original comment by marndt@final-memory.org on 4 Aug 2012 at 5:18

Attachments:

GoogleCodeExporter commented 9 years ago
Should not be too hard to do.
Both loading and saving are going to be lossy operations with this one...

Original comment by pulkoma...@gmail.com on 14 Aug 2012 at 8:05

GoogleCodeExporter commented 9 years ago
The original program handles 32k (15bit) color images. Images that use it to 
its full potential (gradients, transparency, antialias) will lose a lot when 
converted to 256 colors in Grafx2.

Original comment by yrizoud on 15 Aug 2012 at 1:23

GoogleCodeExporter commented 9 years ago
I am fully aware of the information loss during the conversion!

The main idea is to be able to draw more easily from within GrafX2 and export 
later to .GOD as that original paint package has a bit awkward GUI.
Esp Sprite/block/tile editing normally won't make use of full 16bit color space 
anyway.

The color loss can be compensated in the end by combining multiple GOD files 
with different 256 color palettes into a larger one.

Regards,
Simon Sunnyboy / Paradize

Original comment by marndt@final-memory.org on 15 Aug 2012 at 3:46

GoogleCodeExporter commented 9 years ago

Original comment by pulkoma...@gmail.com on 6 Oct 2012 at 6:57