imagedata: report if file is DNG
This commit is contained in:
@@ -565,6 +565,8 @@ FramesData::FramesData(const Glib::ustring &fname, time_t ts) :
|
||||
|
||||
meta.getDimensions(w_, h_);
|
||||
|
||||
isDNG = find_exif_tag("Exif.Image.DNGVersion");
|
||||
|
||||
// -----------------------
|
||||
// Special file type detection (HDR, PixelShift)
|
||||
// ------------------------
|
||||
@@ -778,6 +780,11 @@ bool FramesData::getHDR() const
|
||||
return isHDR;
|
||||
}
|
||||
|
||||
bool FramesData::getDNG() const
|
||||
{
|
||||
return isDNG;
|
||||
}
|
||||
|
||||
std::string FramesData::getImageType() const
|
||||
{
|
||||
return isPixelShift ? "PS" : isHDR ? "HDR" : "STD";
|
||||
|
||||
@@ -59,6 +59,7 @@ private:
|
||||
time_t modTimeStamp;
|
||||
bool isPixelShift;
|
||||
bool isHDR;
|
||||
bool isDNG;
|
||||
int w_;
|
||||
int h_;
|
||||
|
||||
@@ -69,6 +70,7 @@ public:
|
||||
unsigned int getFrameCount() const override;
|
||||
bool getPixelShift() const override;
|
||||
bool getHDR() const override;
|
||||
bool getDNG() const override;
|
||||
std::string getImageType() const override;
|
||||
IIOSampleFormat getSampleFormat() const override;
|
||||
bool hasExif() const override;
|
||||
|
||||
@@ -130,6 +130,8 @@ public:
|
||||
virtual bool getPixelShift () 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() const = 0;
|
||||
/** @return true if the file is a DNG file */
|
||||
virtual bool getDNG() 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 getImageType() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user