Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!uwm.edu!lll-winken!sun-barr!newstop!exodus!peregrine!falk From: falk@peregrine.Sun.COM (Ed Falk) Newsgroups: comp.graphics Subject: Re: 24-bit Sun rasterfiles needed Message-ID: <6697@exodus.Eng.Sun.COM> Date: 28 Jan 91 02:39:27 GMT References: <1991Jan25.145603@csd.uwo.ca> Sender: news@exodus.Eng.Sun.COM Organization: Sun Microsystems, Mt. View, Ca. Lines: 33 In article <1991Jan25.145603@csd.uwo.ca> thor@csd.uwo.ca (Jim Thorsley) writes: >I need to get some 24-bit Sun rasterfiles for testing purposes. Could >someone tell me of an anonymous ftp site where I could get some? >Also, if anyone knows the format of these file I would like to know that >too. I know the format of 8-bit files but can't find any info on 24-bit. Well, in a nut-shell, a 24-bit raster file looks like (see ) header: ras_magic = RAS_MAGIC (0x59a66a95) ras_width = width of your image ras_height = height of your image ras_depth = 24 ras_length = (width*3, rounded even) * height ras_type = RT_STANDARD (1) for BGR byte-ordering, or RT_FORMAT_RGB (3) for RGB byte-ordering. ras_maptype = RMT_NONE ras_maplength = 0 data: 'height' rows of 'width' pixels of 3 bytes each. Byte order is either RGB (format RT_FORMAT_RGB) or BGR (format RT_STANDARD) Each row is padded to an even number of bytes, if need be. Normally, if you use pr_load() to load a rasterfile, and it sees a format other than RT_STANDARD or RT_BYTE_ENCODED, it invokes one of the filters in /usr/lib/rasfilters to convert. -ed falk, sun microsystems sun!falk, falk@sun.com To be loyal to rags, to shout for rags, to worship rags, to die for rags -- that is a loyalty of unreason, it is pure animal (Mark Twain).