Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!lll-winken!snll-arpagw!paolucci From: paolucci@snll-arpagw.UUCP (Sam Paolucci) Newsgroups: comp.sys.amiga.tech Subject: Re: CAMG Message-ID: <122@snll-arpagw.UUCP> Date: 11 Jun 89 04:06:26 GMT References: <1373@psueea.UUCP> Reply-To: paolucci@snll-arpagw.UUCP (Sam Paolucci) Organization: Sandia National Labs, Livermore, CA Lines: 46 In article <12085@well.UUCP> shf@well.UUCP (Stuart H. Ferguson) writes: >As I understand it, ILBM.CAMG is an optional property chunk. This means that >files do not have to have it. The only bits you should really look at (and >save!) in the CAMG word are the HAM and HALFBRIGHT bits. The way to decide >if the image should be displayed as interlace or not is to look at the >aspect ratio and image size in the BMHD property. The BMHD is always >provided -- if not, the ILBM is broken. > >What screen size and combination of HIRES and LACE to use for a given set >of aspect ratio and image size information is left as an exersize for the >reader. IFF is meant to be a standard that is applicable to files other than those created on the Amiga. And even files created on the Amiga should be able to be read and used on other computers. As such, any Amiga specific information should be included in the CAMG chunk. That is the purpose of this chunk. Thus any information about HAM, HALFBRITE, as well as DUAL_PLAYFIELD, LACE, and HIRES should all be in the CAMG chunk when applicable. When you use any Amiga specific viewmodes than the CAMG chunk is NOT optional any more. The w and h in the BitMapHeader can only (and should only) tell you the image dimension in pixels. The variables pageWidth and pageHeight should be the size in raster units that the image is meant to be displayed. Note that these interpretations are non-Amiga specific, as they should be, and have nothing to do with LACE or HIRES. Thus if an image is to be displayed in interlace, this property should be contained in the CAMG chunk, as other computers don't understand what interlace is. All that is important on the other computer is the size of the image that is to be displayed. That it is to be displayed in interlace is only relevant to the Amiga. Any other interpretations or deductions about Amiga ViewModes from sizes of the image are pure hacks that may only be necessary because of poorly written ILBM files by some well known applications. I have even seen some that are meant to use HALFBRITE that don't say so in the CAMG chunk. By using these types of hacks, it only perpetuates badly written ILBM files. When reading an ILBM file you should not have to guess what ViewModes to use. You should only use what is specifically contained in the file. -- -+= SAM =+- "the best things in life are free" ARPA: paolucci@snll-arpagw.llnl.gov