Fuji X-E2 Firmware 4.0

LibRaw used to support Fuji X-E2 raw files. But with the recent camera update to firmware 4.0, the raw file format seems to have changed and LibRaw is not able to read it. Here is the output from simple_dcraw and dcraw_emu. Both were compiled from the latest 0.18 source:

>simple_dcraw.exe Black.RAF
Black.RAF: Unexpected end of file
Cannot unpack Black.RAF: Input/output error

>dcraw_emu.exe -v "Black.RAF"
Processing file Black.RAF
Black.RAF: Unexpected end of file
Cannot unpack Black.RAF: Input/output error

This forum doesn't let me attach a raw file, so here is a link to my test image on Google Drive.

https://drive.google.com/file/d/0BzcmCgBZCb5WZ2wtek1PODlaWG8/view?usp=sh...

Can this support be added? Thanks.

Forums: 

X-E2 firmware 4.0 to be

X-E2 firmware 4.0 to be supported in next development snapshot.

We plan to release it in April.

-- Alex Tutubalin @LibRaw LLC

Thanks!

Thanks!

Any chance that this patch would be released as part of 0.17?

We have a number of users who are reporting this problem right now. Would it be possible to send us a patch sooner or point me in the right direction on how to fix it myself?

Thanks.

0.17 to be updated only for

0.17 to be updated only for critical security bugs, sorry.

-- Alex Tutubalin @LibRaw LLC

Patch is simple:

Patch is simple:
Change these lines in internal/dcraw_common.cpp/parse_fuji()

      if ((tag = get4()) > 10000) tag = get4();
      width = tag;

to these

      if ((tag = get4()) > 10000) tag = get4();
      if (tag > 10000) tag = get4();
      width = tag;

(In FW 4.0 extra 4 bytes to binary data has added)

-- Alex Tutubalin @LibRaw LLC