EImagingError: Error while loading images from file.... Exception message: Access violation
galfar opened this issue · 4 comments
Original report by Anonymous.
When trying to deskew landscape images on Windows, the error message:
EImagingError: Error while loading images from file "name of file" <format: tif> Exception message: Access violation
appears.
Original comment by imsempere (Bitbucket: imsempere, GitHub: imsempere).
ok, now that you mentioned which build I used, I was using deskew64.exe, but have tried now with deskew.exe and it's working, so the issue seems to be in the 64 build. As for the image, you can find a sample at https://www.dropbox.com/s/npjfg18hy3je37j/SV_412%211%211_0003.tif?dl=0
Thanks for your help!
Original comment by Marek Mauder (Bitbucket: galfar, GitHub: galfar).
Thanks for the sample TIFF.
I knew that Deskew (Windows build using precompiled LibTiff) built in FPC has problems with some TIFFs but so far what I got in the reports were JPEG compressed TIFFs and I assumed the problem lies
somewhere in linking libtiff and jpeglib.
32bit Windows release was still built with Delphi so it was only reported with 64bit Windows release.
Miguel Medalha noticed that TIFFs saved by Windows Photo Viewer always fail to load.
I could then compare working TIFF and then the same one resaved by WPV.
Windows Photo Viewer and probably some others put some extensions in TIFF header which libtiff can handle but issues a warning - and improper handling of this warning caused that AV exception (linking C and Pascal
code together in a single exe is full of pitfalls).