Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!ira.uka.de!fauern!faui43.informatik.uni-erlangen.de!lsmichae From: lsmichae@immd4.informatik.uni-erlangen.de (Lars Michael) Newsgroups: comp.sys.atari.st Subject: Re: SPECTRUM 512 information Message-ID: <1991Mar1.152447.2460@informatik.uni-erlangen.de> Date: 1 Mar 91 15:24:47 GMT References: <1991Mar1.152116.2195@informatik.uni-erlangen.de> Organization: CSD., University of Erlangen, Germany Lines: 77 Hi netlanders, I have made some small conversion routines to a new intermediate picture format called RGB and a routine from RGB to uncompressed SPECTRUM 512 format. The results a very nice !!! The RGB format goes like this: *.RGB (only low resolution) 1 word resolution flag (ignored) 16 word color palette (ignored) 16000 words red values of the picture (screen format) The color index of the point gives the R-value 1 word resolution flag (ignored) 16 word color palette (ignored) 16000 words green values of the picture (screen format) The color index of the point gives the G-value 1 word resolution flag (ignored) 16 word color palette (ignored) 16000 words blue values of the picture (screen format) The color index of the point gives the B-value ------------ 96102 bytes You may have noticed that each of the R-, G- and the B-planes looks like a DEGAS *.PI1. That's right and you may set the palette to increasing gray values to have a look at the R-plane. Caveats: The color palette is *always* ignored. To get the color value from a pixel get the color indices of the correlated pixels in the R-, G- and B-plane and build directly the RGB-value 0xrgb (no indirection to the color palettes)! I hope there's a discussion about this "new" picture format. My conversion routines are TMPTORGB, (DBW-render temp file to RGB intermediate file) PI1TORGB, (three DEGAS files to one RGB intermediate file) IFFTORGB, (AMIGA IFF file to RGB intermediate file) RGBTOSPU. (RGB intermediate file to SPECTRUM uncompressed) Some notes: - PI1TORGB is used to concatenate digitized R-, G- and B-planes (each plane stored as DEGAS picture). - IFFTORGB uses the CAMG chunk and recognizes HAM and INTERLACE. - RGBTOSPU runs up to 10 minutes, depending on the file. It calculates a color histogram and looks for the best fit of the maximum color in the scan line. If the virtual palette is full all left pixels are set each to the color index of the nearest color in the *real* palette. Some future projects are: GIFTORGB, (GIF file to RGB intermediate file) SPUTOSPC, (compress SPECTRUM file) SPCTOSPU. (uncompress SPECTRUM file) If there's some interest in these routines I'll post them to comp.sources.atari.st and comp.binaries.atari.st. Lars P.S.: Someone out there who has a gif decoder? I have knowledge of the LZW-compression used in gif files, but would prefer to get sources for this to save sleep, tea and sweat ... +-----------------------------------+----------------------------------+ | Lars Michael | | | | | | lsmichae@faui43.uni-erlangen.de | | | | "Down with ATARI, | +-----------------------------------+ / | \ Long live the ST !" | | "May the Schwartz be with you!" | / | \ | +-----------------------------------+----------------------------------+