Hi,
I am writing software to convert tiff frames to jpeg files using Aspose.Imaging for .Net.
While doing so, I found three problems:
1. Orientation tag is not returned for jpeg- or packbits-compressed tiff frames.
2. RotateFlip sometimes corrupts CCITT4-encoded tiff frames.
3. RotateFlip and Save raise internal error “Destination array was not long enough.” for CCITT-RLE encoded tiff frames.
For me, problem 1 is the most important because libtiff also has problems with jpeg-compressed tiff files, so that I do not have an alternative solution for the file conversion.
Test program and test files
To investigate the extent of problem, I have created a test program. Source code (without license file) is attached as TestAsposeImaging.zip. I have also attached my standard set of test images in various formats and orientations as exif-orientations-testimages.zip.
The test program converts all frames of a tiff that is dropped on the exe to jpeg and writes a log file to the directory where the image files are located. The log is in Microsoft Service Trace Viewer (.svclog) format.
Test results with Aspose.Imaging 1.7.1.0
- ccitt4: Orientation OK. Output jpeg for “ExifOrientation8.tif” is corrupted (vertical black line at 25% horizontal position)
- ccitt-rle: Orientation OK. Both TiffFrame.RotateFlip and TiffFrame.Save raise internal error “Destination array was not long enough.”. Jpeg file is never saved correctly.
- jpeg type 6: Orientation always returned as 0. RotateFlip not tested, Save works fine.
- jpeg type 7: Orientation always returned as 0. RotateFlip not tested, Save works fine.
- lzw-bw: Everything works as expected.
- lzw-color: Everything works as expected
- packbits-color: Orientation always returned as 0. RotateFlip not tested, Save works fine.
Best regards,
Berend