Changed crop detection mechanism according to code review comment
Changed the crop detection to use the CropMode Fujifilm tag from the makernotes instead of an arbitrary threshold.
This commit is contained in:
@@ -76,22 +76,20 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
enum CropMode : std::uint_fast16_t { // RT
|
||||
NA = 0, // RT
|
||||
FullFrameOnGfx = 1, // RT
|
||||
SportsFinderMode = 2, // RT
|
||||
ElectronicShutter1_25xCrop = 4 // RT
|
||||
}; // RT
|
||||
// stores the cropdata read from the file RT
|
||||
struct CropData { // RT
|
||||
std::uint_fast16_t width, // RT
|
||||
height, // RT
|
||||
top_margin, // RT
|
||||
left_margin; // RT
|
||||
bool complete = false; // RT
|
||||
CropMode crop_mode = NA; // RT
|
||||
} read_crop; // RT
|
||||
/* RT
|
||||
If the difference between the read dimension (width /height) RT
|
||||
and the constant dimension (eg.: from cameraconstants) RT
|
||||
is greater than this amount, RT
|
||||
then the file should be considered raw cropped (for fuji cropped raw) RT
|
||||
*/ // RT
|
||||
static constexpr std::uint_fast16_t is_cropped_margin = 500; // RT
|
||||
bool is_cropped = false; // RT
|
||||
int exif_base, ciff_base, ciff_len;
|
||||
rtengine::IMFILE *ifp;
|
||||
FILE *ofp;
|
||||
|
Reference in New Issue
Block a user