2002.02.27 02:53 "Must set "ImageWidth" before writing data", by Stephen Rasku

2002.02.27 02:53 "Must set "ImageWidth" before writing data", by Stephen Rasku

I am trying to write an encoded strip and I am getting the error message specified in the subject line. I am using v3.5.5.

I looked in the source and this happens if FIELD_IMAGEDIMENSIONS is not set. However, the man page for TIFFSetField doesn't mention this field. In fact, tif_dir.h, refers to this as a "multi-item field". This leads me to believe (possibly incorrectly) that this is set automatically by the TIFF library if you set the correct fields.

I am explicitly setting the following fields:

TIFFTAG_COMPRESSION
TIFFTAG_IMAGEWIDTH
TIFFTAG_ROWSPERSTRIP
TIFFTAG_ROWSPERSTRIP
TIFFTAG_YRESOLUTION

Are there other fields I need to set to get rid of this error message?

Stephen Rasku                   E-mail: stephen@tgivan.com
Senior Software Engineer      Web:    http://www.pop-star.net/
TGI Technologies