[comp.sys.amiga.tech] IFF: CAMG, ViewMode.

stephan@cup.portal.com (Stephen Derek Schaem) (06/07/89)

 I hope someone can help me here... Well after taking Ushow has base I finaly
crunch it to it's max and get a executable in one HUNK without a Reloc
table, Use other methode instead of geting input via window IDCMP and some
other tricks with the data.All that to get a viewer under 740bytes.
 My problem is with CAMG, some file dont have a viewport mode information and
I cant seem to get it to work normaly...
 I check the original source of ushow but nothing show of it set the view mode
exepted by the info in CAMG.I just dont anderstand how it's done...
 And why some file dont have have a CAMG chunk! I have the Overscan routines
writen also, just that Viewmode thing.
 Well, any info on CAMG and how ushow set the viewmode will be greatly 
apreciated!
 

shf@well.UUCP (Stuart H. Ferguson) (06/09/89)

+-- stephan@cup.portal.com (Stephen Derek Schaem) writes:
|  And why some file dont have have a CAMG chunk! I have the Overscan routines
| writen also, just that Viewmode thing.
|  Well, any info on CAMG and how ushow set the viewmode will be greatly 
| apreciated!

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.
-- 
		Stuart Ferguson		(shf@well.UUCP)
		Action by HAVOC

stephan@cup.portal.com (Stephen Derek Schaem) (06/13/89)

 Well I fixed that problem by: if a CMAP exist use it and if not gues
the Viewmode.
 Right now I think I got the 'perfect' file viewer ever made for the amiga..
No pretention indented, but after testing 13 program I found that they all
failed to view corectly some pictures!
 Some even crash really often.The bigest problem people have is overscan,
half bright, color decompacting (from CAMG), and very small brush.
 The best test where on the lasetest pictures found in the Fish disk, 99%
failed to show them exepted of course loadpic (that is very bad used with 
other pictures) and the one I'm working on:-)
 I will post the source and comment jun-16 after a demo at Augnet, the
first think I will point out is how one should creat a ColorTable from
a CAMG chunck.Since from what I saw the first 4 bit are not alway cleared
in the byte holding the Red,green or blue color.
 I hope to make people delete all the pictures ever made until now:-)