Add factor() method to OpenJPEGImage.
authorCarl Hetherington <cth@carlh.net>
Sat, 26 Nov 2016 15:10:24 +0000 (15:10 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 26 Nov 2016 15:10:24 +0000 (15:10 +0000)
src/openjpeg_image.cc
src/openjpeg_image.h

index e71d8141ec26b76fd2c2b8efed9d76572f0124f8..cf9063a92455fea1520db26cf1c8c8873a559cd6 100644 (file)
@@ -141,6 +141,12 @@ OpenJPEGImage::precision (int component) const
        return _opj_image->comps[component].prec;
 }
 
+int
+OpenJPEGImage::factor (int component) const
+{
+       return _opj_image->comps[component].factor;
+}
+
 bool
 OpenJPEGImage::srgb () const
 {
index e789cd4036bd2e246982c0f1fa9792e8ceabc9ac..fa83a8dea39077d42150e592420e12d766defd99 100644 (file)
@@ -57,6 +57,7 @@ public:
        Size size () const;
        int precision (int component) const;
        bool srgb () const;
+       int factor (int component) const;
 
        /** @return Pointer to opj_image_t struct.  The caller
         *  must not delete this.