tga2cry -- Targa to 16-bit CRY or RGB converter
-----------------------------------------------
This program converts a 24-bit RGB Targa picture file to an assembly
language or binary file containing Jaguar CRY or RGB image data.

Usage:

tga2cry [-binary][-dither][-header][-hflip][-vflip][-rotate]
	[-resize w,h][-filter filt][-aspect]
	[-f format][-o outfilename] inputfilename

Only 24-bit Targas are understood by this program; they may be RLE compressed.
The input file name must be given explicitly. The output file name may
be given with the "-o" option; if no output file name is given, the
input file name with the .TGA extension changed to .CRY (for CRY output),
.RGB (for RGB output) or .MSK (for MSK output) is used.

Other options:

-binary:
	Output raw binary data, rather than assembly language. Binary
	data must be included with the -i or -i options of the ALN linker.
	
-dither:
	Use Floyd-Steinberg dithering during the conversion. This can
	be useful in reducing the "banding" that can appear in CRY
	pictures because of the more limited range of colors (as opposed
	to intensities) that CRY has as compared to RGB. The -dither
	flag has no effect for RGB or MSK output.

-header:
	Output a header suitable for some texture mapping tools; with this
	option, the width, height, and flags for the blitter are placed
	in the first phrase of the data, with the picture data immediately
	following. (See below for sample output.)

-hflip:
	Flip the picture horizontally.

-vflip:
	Flip the picture vertically.

-rotate:
	Rotate the picture 90 degrees clockwise (i.e. turn it on its side).

-f format:
	Controls the format of the data. This must be one of:
		cry	for 16 bit CRY output data (the default)
		rgb	for 16 bit RGB output data
		rgb24	for (Jaguar format) 24 bit RGB data
		msk	for a 1 bit per pixel mask, with a 1 bit
			wherever the input has a black pixel and
			a 0 bit elsewhere; "black" pixels are those
			with all three of red, green, and blue
			set to 0
-resize w,h:
	Resize the picture to w pixels wide and h pixels high.

The following options control how resizing is done:

-aspect:
	Preserve aspect ratio. If this option is given, a black border
	will be added either to the right and left or top and bottom sides
	of the output, as appropriate, so that the resized picture has
	the same aspect ratio as the input.

-filter filt:
	Controls the filter used during resizing. Different filters will
	give different weight to pixels when blending them; which one
	will look best generally depends on the input, although there
	frequently isn't much difference. Filters available are:
		box	simple box filter; produces noticeable
			pixellation when scaling up
		bell	pseudo bell-shaped curve
		lanc	Lanczos3 filter
		mitch   Mitchell filter
		sinc	Sinc function, windowed from -4.0 to 4.0
		tri	triangle filter

	The Mitchell filter is the default, and usually produces
	good results.


Output:

Default:

		.globl	name
		.data
		.phrase
	name:
		dc.w ...

With the -header option:

		.globl	name
		.data
		.phrase
	name:
		dc.w	width,height
		dc.l	$xxxxxxxx	; (PITCH1|PIXEL16|WIDxxx|XADDINC)
		dc.w ...

Note that TGA2CRY contains the tables from BLIT.INC, so it can
calculate the blitter flags itself.




Changes
-------

July 25, 1994
-------------
This is a new and vastly improved version of TGA2CRY which has been
completely rewritten.  The same tool is now available on both PC/MSDOS and
Atari/TOS machines (unlike in the past when we had slightly different
conversion tools on each system).

The PC/MSDOS version of TGA2CRY is a 32-bit DOS protected mode application.
The files DPMI32VM.DLL, 32RTM.EXE, CW3211.DLL are part of the Borland
Powerpack DOS Protected Mode Interface support package, and are copyright
(c) 1994 Borland International, All rights reserved.  They are distributed
with permission.

Because of a bug with the PC/MSDOS version of the MAKE utility not properly
passing commandline options to certain DPMI programs, there is a problem
calling TGA2CRY.EXE directly from your MAKEFILE.  To work around this, we
have included a batch file named MAKECRY.BAT which simply calls the
TGA2CRY.EXE.  It's simple, and only passes the first commandline option,
but you can modify it to do more if necessary.  A similar MAKECRY.G batch
file for the GULAM shell on the Atari/TOS platform is also provided.


