Blitz (7/640)

From:Paul Burkey
Date:10 Aug 99 at 21:16:44
Subject:Re: 16Bit Chunky

Daniel Allsopp wrote:
> Has anyone any idea on how to convert a 16Bit ILM image file to a 16Bit
> chunky file?
> How are they stored/decoded etc etc....I've searched all over the
> internet but can't find anything

I'm not sure if you only need file format info or information on pixel
formats etc. anyway, heres a bit of help on everything :)

I'm not sure how they are stored in the ILBM format, you're best off
trying to find specs for a format you can deal with. Targa is apparently
quite a good (simple) format to use but you may find good docs on
iff, bmp, tiff also. I've been using PaintShop Pro for my art work
lately and that can save as RAW format which is probably the easiest
of the lot. It's just an array of 24bit pixels.

I'm not sure which file formats actually support 16bit color, most of
them do 8bit and 24bit but thats not really the issue here. What you
need to do is get access to the colour of each pixel (whatever the
depth)
and convert them to your 16bit format. This is where the fun starts.

Depending on the GFX card, the OS, the RTG software etc.. You will
probably be faces with a range of 16bit pixel formats on your screen.
There is no actual definitive 16bit format, they are dependant on the
graphics card and (as a developer) you are supposed to deal with
all of the possible pixel formats.

CyberGraphX defines the following formats:-

PIXFMT_RGB16
PIXFMT_BGR16
PIXFMT_RGB16PC
PIXFMT_BGR16PC

So, in theory when you open a 16bit screen, you could be provided with
any
of the above. I think you can request a specific pixel format but I dont
know if it's safe to presume that all or any particular format exists
on a particular card. I guess its' fairly safe to presume PIXFMT_RGB16
will exist on every board but who knows? :)

For the actual pixel formats you`d have to search for some specs or
perhaps
do some experimentation. A 16bit pixel might look like xRRRRRGGGGGBBBBB
or
perhaps RRRRRGGGGGGBBBBB where the red/green/blue values each have 5bit
(or
sometimes 6bit for green) but sometimes the extra 16th bit is not used
for
actual color. How the 16bit value is built is to you but usually it's
done
by taking the red,green.blue values and shifting them into possition
before
adding them together eg "(Red LSL 9)+(Green LSL 5)+Blue" but please note
that I just made that code up; it's just a hint really! :)

Cheers,

Paul



< Paul Burkey http://www.sneech.freeserve.co.uk >

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie