The attached 'pslib.c' file is a script that extracts an image out of the attached ATF files and outputs a TIFF file for each ATF file. The script has worked in the past, but is no longer working and we need to get it working. The broken script simple outputs an invalid TIFF file (invalid format). I am running into problems on line 187 and 191 where the image height and width are set - they are not being set correctly.
Completed project includes:
1. Working Script
2. Two valid TIFF images that you are able to extract from the two ATF files using the new script
3. Detailed description of the problem/bug and fix you completed