First steps to extend dynamic profiles for Pixel Shift and HDR images
This commit is contained in:
@@ -80,7 +80,8 @@ bool DynamicProfileRule::matches (const rtengine::FramesMetaData *im) const
|
||||
&& shutterspeed (im->getShutterSpeed())
|
||||
&& expcomp (im->getExpComp())
|
||||
&& camera (im->getCamera())
|
||||
&& lens (im->getLens()));
|
||||
&& lens (im->getLens())
|
||||
&& rawType(im->getRawType(0)));
|
||||
}
|
||||
|
||||
namespace
|
||||
@@ -208,6 +209,7 @@ bool DynamicProfileRules::loadRules()
|
||||
get_double_range (rule.expcomp, kf, group, "expcomp");
|
||||
get_optional (rule.camera, kf, group, "camera");
|
||||
get_optional (rule.lens, kf, group, "lens");
|
||||
get_optional (rule.rawType, kf, group, "rawtype");
|
||||
|
||||
try {
|
||||
rule.profilepath = kf.get_string (group, "profilepath");
|
||||
@@ -240,6 +242,7 @@ bool DynamicProfileRules::storeRules()
|
||||
set_double_range (kf, group, "expcomp", rule.expcomp);
|
||||
set_optional (kf, group, "camera", rule.camera);
|
||||
set_optional (kf, group, "lens", rule.lens);
|
||||
set_optional (kf, group, "rawtype", rule.rawType);
|
||||
kf.set_string (group, "profilepath", rule.profilepath);
|
||||
}
|
||||
|
||||
|
@@ -59,6 +59,7 @@ public:
|
||||
Range<double> expcomp;
|
||||
Optional camera;
|
||||
Optional lens;
|
||||
Optional rawType;
|
||||
Glib::ustring profilepath;
|
||||
};
|
||||
|
||||
|
@@ -692,6 +692,10 @@ bool FrameData::getHDR () const
|
||||
{
|
||||
return isHDR;
|
||||
}
|
||||
std::string FrameData::getRawType () const
|
||||
{
|
||||
return isPixelShift ? "PS" : isHDR ? "HDR" : "STD";
|
||||
}
|
||||
IIOSampleFormat FrameData::getSampleFormat () const
|
||||
{
|
||||
return sampleFormat;
|
||||
@@ -808,6 +812,11 @@ bool FramesData::getHDR (unsigned int frame) const
|
||||
return frames.empty() || frame >= frames.size() ? false : frames.at(0)->getHDR ();
|
||||
}
|
||||
|
||||
std::string FramesData::getRawType (unsigned int frame) const
|
||||
{
|
||||
return frames.empty() || frame >= frames.size() ? "STD" : frames.at(0)->getRawType();
|
||||
}
|
||||
|
||||
IIOSampleFormat FramesData::getSampleFormat (unsigned int frame) const
|
||||
{
|
||||
return frames.empty() || frame >= frames.size() ? IIOSF_UNKNOWN : frames.at(frame)->getSampleFormat ();
|
||||
|
@@ -63,6 +63,7 @@ public:
|
||||
|
||||
bool getPixelShift () const;
|
||||
bool getHDR () const;
|
||||
std::string getRawType () const;
|
||||
IIOSampleFormat getSampleFormat () const;
|
||||
rtexif::TagDirectory* getExifData () const;
|
||||
procparams::IPTCPairs getIPTCData () const;
|
||||
@@ -104,6 +105,7 @@ public:
|
||||
FrameData *getFrameData (unsigned int frame) const;
|
||||
bool getPixelShift (unsigned int frame = 0) const;
|
||||
bool getHDR (unsigned int frame = 0) const;
|
||||
std::string getRawType (unsigned int frame) const;
|
||||
IIOSampleFormat getSampleFormat (unsigned int frame = 0) const;
|
||||
rtexif::TagDirectory* getFrameExifData (unsigned int frame = 0) const;
|
||||
rtexif::TagDirectory* getRootExifData (unsigned int root = 0) const;
|
||||
|
@@ -123,6 +123,9 @@ public:
|
||||
virtual bool getPixelShift (unsigned int frame = 0) const = 0;
|
||||
/** @return false: not an HDR file ; true: single or multi-frame HDR file (e.g. Pentax HDR raw file or 32 bit float DNG file or Log compressed) */
|
||||
virtual bool getHDR (unsigned int frame = 0) const = 0;
|
||||
|
||||
/** @return false: not an HDR file ; true: single or multi-frame HDR file (e.g. Pentax HDR raw file or 32 bit float DNG file or Log compressed) */
|
||||
virtual std::string getRawType (unsigned int frame) const = 0;
|
||||
/** @return the sample format based on MetaData */
|
||||
virtual IIOSampleFormat getSampleFormat (unsigned int frame = 0) const = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user