Aspose.Imaging not always reads Tiff orientation tag- problems in RotateFlip

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





Hi Berend,


Thanks for your inquiry.

Sorry for the delayed response. We were in process of testing and publishing new release of Aspose.Imaging for .NET 1.8. Can you please download and try latest API hopefully your reported issues will be resolved.

Please feel free to contact us for any further assistance.

Best Regards,

Hi Tilal,

I see partial improvement:
1. Orientation tag is not returned for jpeg- or packbits-compressed tiff frames. Not fixed
2. RotateFlip sometimes corrupts CCITT4-encoded tiff frames. Fixed
3. RotateFlip and Save raise internal error “Destination array was not long enough.” for CCITT-RLE encoded tiff frames. Fixed
Unfortunately, problem 1 was the most important for me and does not appear to be fixed.
I am afraid that I also found one more problem since my previous post:
4. Jpeg compressed tiff images fail to load on Windows XP and Windows Server 2003
Jpeg-encoded tiff files (both type 6 and type 7) fail to load on Windows XP and Server 2003 32 bit. I get this error:
Image loading failed.
at Aspose.Imaging.Image.\a(StreamContainer , LoadOptionsBase )
at Aspose.Imaging.Image.Load(String filePath)
at TestAsposeImaging.Program.Main(String[] args)
I would very much appreciate a solution or workaround for the Windows Server 2003 R2 platform, that is still used by my customers. I found this error when trying to deploy my application on a Windows Server 2003 test server.
Best regards,
Berend

Hi Berend,


Thanks for your feedback. After initial investigation of orientation issue, I’ve logged the issue as IMAGING-33499 in our issue tracking system for further investigation and resolution. We will notify you via this forum thread as soon as it is resolved.

Moreover, we are looking into to other issue of Windows XP / Windows server 2003 and will update you soon.

Sorry for the inconvenience faced.

Best Regards,

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.