Posted: 2006-02-19T16:54:06-07:00
First of all the IM "txt:" image format only uses intergers and not floating point. so you can not use numbers in the 0.0 to 1.0 range.
You can use numbers from 0 to 255 or 0 to 65535 however (the later
will only work on a Q16 version of IM, not a Q8 ).
Second the header is vital. It first tells IM that this is a "txt:" image
and not a plain text file. also what size, depth and format the image
is using. The order of the pixels however does not matter, or even if all the pixels are defined (undefinaed pixels generally come out as black).
Third, -fx uses values from 0.0 to 1.0 for ALL colors and intensities but uses a rounded off interger for all position and offset locations within images. As such you must scale the color by the length of your LUT to
find the right offset into the image for the replacement color.
For all the details of this, as well as exact formular if you need it, see...
IM Examples, Color Modifications, Color Lookup Tables
http://www.cit.gu.edu.au/~anthony/graph ... #color_lut
Read it carefully, expecially the expert or owl comment at the end of the next "Function to LUT Conversion" section.
You can use numbers from 0 to 255 or 0 to 65535 however (the later
will only work on a Q16 version of IM, not a Q8 ).
Second the header is vital. It first tells IM that this is a "txt:" image
and not a plain text file. also what size, depth and format the image
is using. The order of the pixels however does not matter, or even if all the pixels are defined (undefinaed pixels generally come out as black).
Third, -fx uses values from 0.0 to 1.0 for ALL colors and intensities but uses a rounded off interger for all position and offset locations within images. As such you must scale the color by the length of your LUT to
find the right offset into the image for the replacement color.
For all the details of this, as well as exact formular if you need it, see...
IM Examples, Color Modifications, Color Lookup Tables
http://www.cit.gu.edu.au/~anthony/graph ... #color_lut
Read it carefully, expecially the expert or owl comment at the end of the next "Function to LUT Conversion" section.