UniView raw file header description
Revision 1.0, copyright ©Andrej Krutak 2002

The description string has format similar to C's function printf format string. You can write
normal text , \x escape sequences (0x5a, 0xA5 etc.) and %-ed 'tags'.

You can use following tags:

tag		:	meaning
%x		:	image x size (width)
%y		:	image y size (height)
%p		:	image color depth
%X		:	image x size (width) as 4 byte integer
%Y		:	image y size (height) as 4 byte integer
%P		:	image color depth as 4 byte integer
%~x		:	image x size (width) as 2 byte integer
%~y		:	image y size (height) as 2 byte integer
%~p		:	image color depth as 2 byte integer
%t		:	whole image color table
%NN		:	image color table item no. NN (NN is in hex format, e.g. 0A)

Examples:

========================
------------------------------------------
Width: %x
Height: %y
Bpp: %b
------------------------------------------

Image size is 200x100 and is 24 BPP
This writes following to file:

------------------------------------------
Width: 200
Height: 100
Bpp: 24
------------------------------------------
========================

========================
------------------------------------------
P6\x0a%x %y\x0a255\x0a
------------------------------------------

Image size is 200x100 and is 24 BPP
This writes following to file:

------------------------------------------
P6
200 100
255
------------------------------------------
========================

========================
------------------------------------------
Some interesting file format %%
xaspect %x yaspect %y bitsperitem %b
colortable %c
------------------------------------------

Image size is 200x100 and is 8 BPP
This writes following to file:

------------------------------------------
Some interesting file format %
xaspect 200 yaspect 100 bitsperitem 8
...asdo9238boiuweoriuwoeuirwoer...
------------------------------------------
... the last line will be in binary format, which can't be shown in text mode :-(

The same on 200x100 and 24 BPP image
------------------------------------------
Some interesting file format %
xaspect 200 yaspect 100 bitsperitem 24

------------------------------------------
========================

It's similar for %X, %Y, %P and %~x, %~y, %~p...