When trying to open a DNG raw image file from a Samsung Galaxy S21+ using the TOpenImageEnDialog, I get an access violation in ielib64.dll, or ielib32.dll if running 32bit, when I just select the dng file (not even a double click or the open button, just single clicking the dng file). Running outside of the IDE it does not give an error.
It also only occurs the first time I click the file. Subsequent clicking or double-clicking of it does not produce an error (I only have the one DNG file though, and no preview is actually shown under the IDE or outside of it)
First chance exception at $00007FFBF775D630. Exception class $C0000005 with message 'c0000005 ACCESS_VIOLATION'. Process WhisperImageEditor.exe (1272)(26044)
:00007FFBF775D630 ; C:\Projects\WhisperReporterV2\Win64\Debug\ielib64.dll
:00007FFBF775C39B ; C:\Projects\WhisperReporterV2\Win64\Debug\ielib64.dll
ieraw.IEReadCameraRAWStream_libraw($10992A00,$EF39B90,$1098CCF0,$14B830,False)
ieraw.IEReadCameraRAWStream($10992A00,$EF39B90,$1098CCF0,$14B830,False)
imageenio.TImageEnIO.SyncLoadFromStreamRAW($10992A00,'C:\Users\efh20\Desktop\Sample S21 Images\Sample S21 Images\Pro.dng')
imageenio.TImageEnIO.LoadFromFileRAW('C:\Users\efh20\Desktop\Sample S21 Images\Sample S21 Images\Pro.dng')
imageenio.TImageEnIO.LoadFromFile('C:\Users\efh20\Desktop\Sample S21 Images\Sample S21 Images\Pro.dng',20)
imageenio.TImageEnIO.LoadFromFileAuto('C:\Users\efh20\Desktop\Sample S21 Images\Sample S21 Images\Pro.dng')
ieopensavedlg.TOpenImageEnDialog.LoadPreview(True,False)
ieopensavedlg.TOpenImageEnDialog.DoSelectionChange
Line 349 in ieraw.pas where it breaks is:
case librawimage.getType() of
While it does not error when running outside of the IDE, I do just get a black image. The call to ImageEnView1.IO.LoadFromFileTIFF(pFilename) returns that it has a single image, but perhaps the error prevents it from actually loading the image.
Another question... how do I know how many sub indexes there are? I see there is an ImageCount (TIFF_ImageCount), but no TIFF_SubCount or something along those lines.
ImageEn 10.0.1
Delphi 10.4.2
P.S. Windows does show the dng image as a thumbnail, and opens fine under the Photos app (weird though... it starts correctly as portrait and a second or two later shows rotated 90 degrees left).
Eric