By code to process the raw_image array looks like this:
#define RAW(row,col) \ RawData.raw_image[(row)*S.raw_width+(col)] for (row = 0; row < S.height; row++) { for (col = 0; col < S.width; col++) { unsigned short val = RAW(row + S.top_margin, col + S.left_margin); // etc ... } }
This works very well for Canon raw images, but totally falls apart when processing a Fuji RAF file from an S5-Pro.
Loioking at the values in rawdata.sizes I see:
raw_height 1444 raw_width 4352 height 3583 width 3584 top_margin 2 left_margin 32 iheight 3583 iwidth 3584 raw_pitch 8704
How should I check if this for a Fuji raw, and how should I iterate and process this data to end up with the 3583/3584 image with the actual image diagonally across it?
Thanks
Yes, Fuji Super-CCD is
Yes, Fuji Super-CCD is completely different.
Look into raw2image_ex() source for details.
BTW, today, in 2019, it is good enough idea to drop Super-CCD support.
-- Alex Tutubalin @LibRaw LLC
Please don't drop Fujitsu
Please don't drop Fujitsu Super-CCD support, if that's done, people who use my software won't be able to reprocess old images (which the astrophotography folks often do).
I'll take a look at raw2image_ex() to see I can understand it.
Dave
David Partridge
Just to be sure, can you
Just to be sure, can you confirm that the code at line 2783 in libraw_cxx.cpp is the relevant code?
Thanks
David Partridge
I do not know what exact
I do not know what exact version you use. Could you please use github URLs with #l[lineno] markers in URL to point to exact version/exact line.
-- Alex Tutubalin @LibRaw LLC
I couldn't locate the exact
I couldn't locate the exact version I'm using in github (I'm using version 18.8) The code in question reads as follows:
David Partridge
Yes, this is right piece of
Yes, this is right piece of code
-- Alex Tutubalin @LibRaw LLC
Is there a getter for libraw
Is there a getter for libraw_internal_data.unpacker_data.fuji_layout or will I need to sub-class to get at that?
I found is_fuji_rotated() which returns libraw_internal_data.internal_output_params.fuji_width
Thanks
David Partridge
We do not have any plans to
We do not have any plans to drop SuperCCD support:
- raw data is extracted as is (in two subframes), keeping sensor aspect ratio
- processing is adopted from dcraw
Also, we do not have any plans to improve processing part, our goal is raw data and metadata extraction.
-- Alex Tutubalin @LibRaw LLC