Path: news.uiowa.edu!news.physics.uiowa.edu!math.ohio-state.edu!howland.erols.net!news-peer.gsl.net!news.gsl.net!portc01.blue.aol.com!newstf01.news.aol.com!newsbf02.news.aol.com!not-for-mail From: rubywand@aol.com (RUBYWAND) Newsgroups: comp.sys.apple2.programmer Subject: Re: Looking for IIGS Image Format Info Date: 15 Oct 1996 01:34:37 -0400 Organization: America Online, Inc. (1-800-827-6364) Lines: 73 Sender: root@newsbf02.news.aol.com Message-ID: <53v7pd$41f@newsbf02.news.aol.com> References: <53slc8$erd@darla.visi.com> NNTP-Posting-Host: newsbf02.mail.aol.com X-Newsreader: AOL Offline Reader In article <53slc8$erd@darla.visi.com>, nathan@visi.com (Nathan Mates) writes: >In article <53rv03$o1f@newsbf02.news.aol.com>, >RUBYWAND wrote: >> Right; this sounds like the Nibble article describing SuperPac. > > Spelt 'Packbytes'. Actually, it really is "SuperPac" (Nibble: January, 1988). SuperPac is a vertical scan packer-unpacker. The basic format of a packed SP pic is as follows: PREFIX (16 bytes): X-Start, X-End+1, YStart, YEnd+1, Repeat Byte, Format Byte, Len-lo, Len-hi (length of PREFIX + PACKED PIC DATA) The remaining 8 bytes are uncommitted and may be used to link a pic sequence, music, etc.. The Repeat Byte tells the Unpacker that the next two bytes contain the Byte to be written followed by a count. The Repeat Byte is selected during Packing by first scanning the pic (or partial pic) for lowest-count bytes. The Format Byte is, at present, either a $D3 ("S") or a $C4 ("D"). "S" format means the Pic Suffix (Scanline, "reserved", and Palette info) is appended to the Packed Pic Data. "D" format means the Pic Suffix is not appended. "D" format saves time and disk space since, if several pics employ the same Scanline/Palette setup, only the first pic in the series needs to be "S" format to load in the Pic Suffix. PACKED PIC DATA: This comes from Pic bytes scanned vertically, top-to-bottom, moving left to right. The region is defined by XS ,XE, YS, YE. It may be the entire pic or some rectangular part of the pic. Partial pics are useful for doing overlays, as in producing animation. (XS, etc. need not be the same during Unpack. A section packed from one region, may be unpacked at some other.) Non-repeats and runs of fewer than four are encoded 'as is'. Runs greater than four are encoded as follows: Repeat Byte, Byte, Count. For example, if the Repeat Byte is B3, then B3 11 FF says "write $11 255 times". PIC SUFFIX: This includes Scanline, Reserved, and Palette bytes. The Pic Suffix is has a length of 768 bytes and is not packed. Since all Scanline and Palette data is preserved, SuperPac can pack and unpack any screen with no loss of colors for pics using multiple palettes. >>.... >> As to specifics on packed formats, perhaps Nathan, Tom, or someone >>else will put up detailed docs on an ftp site. SuperPac, of course, was >>thoroughly documented in Nibble. > > That'd be Packbytes, and the 4 lines needed to describe it in >Toolbox Ref #1 (look for it in the Misc Toolset chapter) are more than >sufficient. > The PackBytes info is on page 14-39. (All this time, I've been looking for stuff on "Apple Preferred" format.) Thanks for the reference! Rubywand