Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!csd4.milw.wisc.edu!leah!rpi!shadow From: shadow@pawl.rpi.edu (Deven T. Corzine) Newsgroups: comp.sys.amiga.tech Subject: Re: CAMG Message-ID: Date: 11 Jun 89 16:36:15 GMT References: <1373@psueea.UUCP> <122@snll-arpagw.UUCP> Sender: usenet@rpi.edu Organization: Pi-Rho House, Troy, NY Lines: 87 In-reply-to: paolucci@snll-arpagw.UUCP's message of 11 Jun 89 04:06:26 GMT In article <122@snll-arpagw.UUCP> paolucci@snll-arpagw.UUCP (Sam Paolucci) writes: >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. This is correct. (But if the CAMG chunk DOES specify LACE or HIRES, use it.) >>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. And what makes you suddenly decide that just because a picture is HIRES and LACE that suddenly ILBM.CAMG is *required*?? Quite apart from the fact that _by definition_ ILBM.CAMG can NOT be required (as it is an optional chunk added after the standard was released) you don't NEED that chunk to tell you the 640x400 picture you're trying to display is HIRES and LACE. Yes, they are Amiga-specific. No, they are not an integral part of the picture. Nor are they necessary to deduce the proper viewmode. On an Amiga, a 640x400 screen must be HIRES and LACE. It's not so difficult for a viewer program to figure out. >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. Yes, it *should* be contained in a CAMG chunk, but ONLY because it provides one more piece of information about the whole, NOT because it is necessary in any shape or fashion. That it is to be displayed in interlace is a function of the screensize, generally. You will not commonly find pictures you would *prefer* interlaced, if you had 640x400 noninterlaced available as well. If interlace is the only way to get the resolution for display, use interlace. But it's not important to specify, and can never be required. >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. They are not "pure hacks." They are a perfectly valid method of determining the viewmodes when unspecified. An ILBM file which does not specify a proper aspect ratio is poorly written. One without ILBM.BMHD is broken. One without ILBM.CAMG is neither poorly written nor invalid; it is merely less than ideal. (and perhaps out of date) "You should only use what is specifically contained in the file." Why? If you want your program to show a high resolution, interlaced picture in low resolution, non-interlaced mode, what's wrong with that? Are the ViewModes sacred? Amiga pictures save in IFF ILBM files should have CAMG chunks only so as to include more information, but to claim that all programs MUST supply one is stretching things a bit. Deven -- shadow@[128.113.10.2] Deven T. Corzine (518) 272-5847 shadow@[128.113.10.201] 2346 15th St. Pi-Rho America deven@rpitsmts.bitnet Troy, NY 12180-2306 <> "Simple things should be simple and complex things should be possible." - A.K.