Go to the documentation of this file.00001 #ifndef FCAM_DNG_H
00002 #define FCAM_DNG_H
00003
00004 #include "../Frame.h"
00005 #include <string>
00006
00009
00010 namespace FCam {
00011
00016 class _DNGFrame : public _Frame {
00017 public:
00018 ~_DNGFrame() {}
00019
00020 Shot _shot;
00021
00022 Image thumbnail;
00023
00024
00025 struct {
00026 BayerPattern bayerPattern;
00027 unsigned short minRawValue, maxRawValue;
00028 int numIlluminants;
00029 float colorMatrix1[12], colorMatrix2[12];
00030 int illuminant1, illuminant2;
00031 std::string manufacturer, model;
00032 } dng;
00033
00034 const Shot &shot() const { return _shot; }
00035 const Shot &baseShot() const { return shot(); }
00036
00037 BayerPattern bayerPattern() const {return dng.bayerPattern;}
00038 unsigned short minRawValue() const {return dng.minRawValue;}
00039 unsigned short maxRawValue() const {return dng.maxRawValue;}
00040 void rawToRGBColorMatrix(int kelvin, float *matrix) const;
00041
00042 const std::string &manufacturer() const {return dng.manufacturer;}
00043 const std::string &model() const {return dng.model;}
00044
00048 virtual void debug(const char *name="") const;
00049 };
00050
00057 class DNGFrame: public FCam::Frame {
00058 protected:
00059 const _DNGFrame *get() const { return static_cast<_DNGFrame*>(ptr.get()); }
00060
00061 public:
00062
00067 DNGFrame(_DNGFrame *f=NULL);
00071 Image thumbnail() const { return get()->thumbnail; }
00072 };
00073
00078 void saveDNG(Frame frame, const std::string &filename);
00081 DNGFrame loadDNG(const std::string &filename);
00082 }
00083
00084 #endif