Hi,
I'm having trouble with reading a Fuji X Pro 2 raw image. You can download the raw file using this link (26MB).
https://drive.google.com/file/d/0BzcmCgBZCb5WOTlfN0hGcFhfVTg/view?usp=sh...
Adobe Photoshop is able to open this image, but FastRawViewer and a number of other products are not able to.
I have the version of libraw that includes compressed raw support. It is not able to read this image either. dcraw_emu reports:
FujiXPro2_CannotUnpack.RAF: Unexpected end of file
Cannot unpack FujiXPro2_CannotUnpack.RAF: Input/output error
Do you know what could be the problem with this image?
Thanks.
Thank you for sharing the
Thank you for sharing the sample.
In this sample
data offset (of raw data) 805904
data size 25251744
sum is 26057648
but file size is 26057632, so 16 bytes missing somewhere
Do you have only one sample, or some camera produces many such files?
If only one, this looks like some data error (camera, card, transfer). If this is systematic error it should be handled in software (e.g. ignore last bytes without error raise)
-- Alex Tutubalin @LibRaw LLC
I have only one sample. But
I have only one sample. But the photographer that sent me that sample showed me a case where out of 36 images he had, 4 of them appeared corrupted. I'll try to get more samples.
I've digged this data in
I've digged this data in depth: decoder really wants to see these extra bytes for the last line, EOF error looks correct for this data.
-- Alex Tutubalin @LibRaw LLC
BTW, ignoring this error for
BTW, ignoring this error for the last bytes of last line looks OK.
-- Alex Tutubalin @LibRaw LLC
Looks like we can safely
-- Alex Tutubalin @LibRaw LLC
Thanks for the patch, Alex. I
Thanks for the patch, Alex. I'm waiting for more images so we can properly test the patch. I'll send another update when I've done that.
If you'll find another
If you'll find another problem(s), please share the files.
You may send it to info@libraw.org (or to personal E-mail lexa@lexa.ru) if you do not wish to expose these files to public.
-- Alex Tutubalin @LibRaw LLC
I've got 3 more images from
I've got 3 more images from the photographer. They were all reported as being corrupted and after the patch you sent, libraw works with all of them. Thanks!
Thanks for your email too. That would be useful for the future because some photographers do not want to post their images publicly.