Correction as discussed in commit review (see also issue #4008)
This commit is contained in:
@@ -54,7 +54,7 @@ protected:
|
||||
// each frame has the knowledge of "being an"
|
||||
// or "being part of an" HDR or PS image
|
||||
bool isPixelShift;
|
||||
int isHDR; // Number of frame
|
||||
bool isHDR;
|
||||
|
||||
void extractInfo ();
|
||||
|
||||
@@ -64,90 +64,27 @@ public:
|
||||
FrameData (rtexif::ExifManager &exifManager);
|
||||
virtual ~FrameData ();
|
||||
|
||||
bool getPixelShift () const
|
||||
{
|
||||
return isPixelShift;
|
||||
}
|
||||
int getHDR () const
|
||||
{
|
||||
return isHDR;
|
||||
}
|
||||
|
||||
IIOSampleFormat getSampleFormat () const
|
||||
{
|
||||
return sampleFormat;
|
||||
}
|
||||
|
||||
const rtexif::TagDirectory* getExifData () const
|
||||
{
|
||||
return root;
|
||||
}
|
||||
const procparams::IPTCPairs getIPTCData () const;
|
||||
|
||||
bool hasExif () const
|
||||
{
|
||||
return root && root->getCount();
|
||||
}
|
||||
bool hasIPTC () const
|
||||
{
|
||||
return iptc;
|
||||
}
|
||||
|
||||
struct tm getDateTime () const {
|
||||
return time;
|
||||
}
|
||||
time_t getDateTimeAsTS() const
|
||||
{
|
||||
return timeStamp;
|
||||
}
|
||||
int getISOSpeed () const
|
||||
{
|
||||
return iso_speed;
|
||||
}
|
||||
double getFNumber () const
|
||||
{
|
||||
return aperture;
|
||||
}
|
||||
double getFocalLen () const
|
||||
{
|
||||
return focal_len;
|
||||
}
|
||||
double getFocalLen35mm () const
|
||||
{
|
||||
return focal_len35mm;
|
||||
}
|
||||
float getFocusDist () const
|
||||
{
|
||||
return focus_dist;
|
||||
}
|
||||
double getShutterSpeed () const
|
||||
{
|
||||
return shutter;
|
||||
}
|
||||
double getExpComp () const
|
||||
{
|
||||
return expcomp;
|
||||
}
|
||||
std::string getMake () const
|
||||
{
|
||||
return make;
|
||||
}
|
||||
std::string getModel () const
|
||||
{
|
||||
return model;
|
||||
}
|
||||
std::string getLens () const
|
||||
{
|
||||
return lens;
|
||||
}
|
||||
std::string getSerialNumber () const
|
||||
{
|
||||
return serial;
|
||||
}
|
||||
std::string getOrientation () const
|
||||
{
|
||||
return orientation;
|
||||
}
|
||||
bool getPixelShift () const;
|
||||
bool getHDR () const;
|
||||
IIOSampleFormat getSampleFormat () const;
|
||||
rtexif::TagDirectory* getExifData () const;
|
||||
procparams::IPTCPairs getIPTCData () const;
|
||||
bool hasExif () const;
|
||||
bool hasIPTC () const;
|
||||
tm getDateTime () const;
|
||||
time_t getDateTimeAsTS () const;
|
||||
int getISOSpeed () const;
|
||||
double getFNumber () const;
|
||||
double getFocalLen () const;
|
||||
double getFocalLen35mm () const;
|
||||
float getFocusDist () const;
|
||||
double getShutterSpeed () const;
|
||||
double getExpComp () const;
|
||||
std::string getMake () const;
|
||||
std::string getModel () const;
|
||||
std::string getLens () const;
|
||||
std::string getSerialNumber () const;
|
||||
std::string getOrientation () const;
|
||||
};
|
||||
|
||||
class RawFrameData : public FrameData
|
||||
@@ -171,130 +108,36 @@ public:
|
||||
class FramesData : public FramesMetaData {
|
||||
private:
|
||||
std::vector<FrameData*> frames;
|
||||
int dcrawFrameCount;
|
||||
unsigned int dcrawFrameCount;
|
||||
|
||||
public:
|
||||
FramesData (Glib::ustring fname, RawMetaDataLocation* rml = nullptr, bool firstFrameOnly = false, bool loadAll = false);
|
||||
~FramesData ();
|
||||
|
||||
void setDCRawFrameCount (int frameCount)
|
||||
{
|
||||
dcrawFrameCount = frameCount;
|
||||
}
|
||||
|
||||
int getFrameCount () const
|
||||
{
|
||||
return dcrawFrameCount ? dcrawFrameCount : frames.size();
|
||||
}
|
||||
FrameData *getFrameData (int frame) const
|
||||
{
|
||||
return frames.at(frame);
|
||||
}
|
||||
|
||||
bool getPixelShift (int frame = 0) const
|
||||
{
|
||||
// So far only Pentax provide multi-frame HDR file.
|
||||
// Only the first frame contains the HDR tag
|
||||
// If more brand have to be supported, this rule may need
|
||||
// to evolve
|
||||
|
||||
//return frames.at(frame)->getPixelShift ();
|
||||
return frames.at(0)->getPixelShift ();
|
||||
}
|
||||
int getHDR (int frame = 0) const
|
||||
{
|
||||
// So far only Pentax provide multi-frame HDR file.
|
||||
// Only the first frame contains the HDR tag
|
||||
// If more brand have to be supported, this rule may need
|
||||
// to evolve
|
||||
|
||||
//return frames.at(frame)->getPixelShift ();
|
||||
if (frames.size()) {
|
||||
return frames.at(frame)->getHDR ();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
IIOSampleFormat getSampleFormat (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getSampleFormat ();
|
||||
}
|
||||
|
||||
const rtexif::TagDirectory* getExifData (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getExifData ();
|
||||
}
|
||||
const procparams::IPTCPairs getIPTCData (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getIPTCData ();
|
||||
}
|
||||
|
||||
bool hasExif (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->hasExif ();
|
||||
}
|
||||
bool hasIPTC (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->hasIPTC ();
|
||||
}
|
||||
|
||||
struct tm getDateTime (int frame = 0) const {
|
||||
return frames.at(frame)->getDateTime ();
|
||||
}
|
||||
time_t getDateTimeAsTS(int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getDateTimeAsTS ();
|
||||
}
|
||||
int getISOSpeed (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getISOSpeed ();
|
||||
}
|
||||
double getFNumber (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getFNumber ();
|
||||
}
|
||||
double getFocalLen (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getFocalLen ();
|
||||
}
|
||||
double getFocalLen35mm (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getFocalLen35mm ();
|
||||
}
|
||||
float getFocusDist (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getFocusDist ();
|
||||
}
|
||||
double getShutterSpeed (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getShutterSpeed ();
|
||||
}
|
||||
double getExpComp (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getExpComp ();
|
||||
}
|
||||
std::string getMake (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getMake ();
|
||||
}
|
||||
std::string getModel (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getModel ();
|
||||
}
|
||||
std::string getLens (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getLens ();
|
||||
}
|
||||
std::string getSerialNumber (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getSerialNumber ();
|
||||
}
|
||||
std::string getOrientation (int frame = 0) const
|
||||
{
|
||||
return frames.at(frame)->getOrientation ();
|
||||
}
|
||||
|
||||
void setDCRawFrameCount (unsigned int frameCount);
|
||||
unsigned int getFrameCount () const;
|
||||
FrameData *getFrameData (int frame) const;
|
||||
bool getPixelShift (unsigned int frame = 0) const;
|
||||
bool getHDR (unsigned int frame = 0) const;
|
||||
IIOSampleFormat getSampleFormat (unsigned int frame = 0) const;
|
||||
rtexif::TagDirectory* getExifData (unsigned int frame = 0) const;
|
||||
procparams::IPTCPairs getIPTCData (unsigned int frame = 0) const;
|
||||
bool hasExif (unsigned int frame = 0) const;
|
||||
bool hasIPTC (unsigned int frame = 0) const;
|
||||
tm getDateTime (unsigned int frame = 0) const;
|
||||
time_t getDateTimeAsTS (unsigned int frame = 0) const;
|
||||
int getISOSpeed (unsigned int frame = 0) const;
|
||||
double getFNumber (unsigned int frame = 0) const;
|
||||
double getFocalLen (unsigned int frame = 0) const;
|
||||
double getFocalLen35mm (unsigned int frame = 0) const;
|
||||
float getFocusDist (unsigned int frame = 0) const;
|
||||
double getShutterSpeed (unsigned int frame = 0) const;
|
||||
double getExpComp (unsigned int frame = 0) const;
|
||||
std::string getMake (unsigned int frame = 0) const;
|
||||
std::string getModel (unsigned int frame = 0) const;
|
||||
std::string getLens (unsigned int frame = 0) const;
|
||||
std::string getSerialNumber (unsigned int frame = 0) const;
|
||||
std::string getOrientation (unsigned int frame = 0) const;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user