Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!snll-arpagw!paolucci From: paolucci@snll-arpagw.UUCP (Sam Paolucci) Newsgroups: comp.sys.amiga.tech Subject: Re: CAMG Message-ID: <123@snll-arpagw.UUCP> Date: 12 Jun 89 01:37:27 GMT References: <1373@psueea.UUCP> <122@snll-arpagw.UUCP> Reply-To: paolucci@snll-arpagw.UUCP (Sam Paolucci) Organization: Sandia National Labs, Livermore, CA Lines: 114 In article shadow@pawl.rpi.edu (Deven T. Corzine) writes: ->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. It is my understanding that optional means that a file that does not make use of any Amiga specific ViewModes does not need to contain it, but if it does, then it should. You cannot assume that anything larger that 640x400 is HIRES and LACE, since when higher resolutions will start appearing on the Amiga, this procedure will fail. I just don't like the idea of decisions based on hardwired current numbers. ->>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. There are reasons to use interlace even when noninterlace is available, particularly if you are trying to use the video capability of 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. -> ->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) I maintain that they are poorly written since there is more than one way to interpret the file just by looking at the size of the picture and number of bitplanes. ->"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? There is also nothing wrong in using your own color table as opposed as what's contained in a file. What you do with the picture is nobody's business. All I'm asking is that complete and correct information should be contained in the file so that if somebody wants to use it, it's there. ->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. I never claimed that all programs must supply one. All I said that only when Amiga specific ViewModes are used, than a CAMG chunk should be written in the file. If this information is superfluous , as you seem to claim, than perhaps we should obsolete this chunk :^). My claim is that it is not superfluous, and it will become more and more essential as more resolutions are available on the Amiga and as more IFF ILBM files are generated on other computers. -- -+= SAM =+- "the best things in life are free" ARPA: paolucci@snll-arpagw.llnl.gov