[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/extragear/graphics/libkdcraw/libkdcraw
From:       Jens Mueller <tschenser () gmx ! de>
Date:       2010-11-25 19:09:59
Message-ID: 20101125190959.8285FAC8A2 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1200787 by jmueller:

provide per channel black offsets

 M  +12 -1     dcrawinfocontainer.cpp  
 M  +3 -0      dcrawinfocontainer.h  
 M  +4 -1      kdcraw_p.cpp  


--- branches/extragear/graphics/libkdcraw/libkdcraw/dcrawinfocontainer.cpp \
#1200786:1200787 @@ -49,6 +49,10 @@
     cameraMult[2]     = 0.0;
     cameraMult[3]     = 0.0;
     blackPoint        = 0;
+    for (int ch=0; ch<8; ch++)
+    {
+        blackPointCh[ch] = 0;
+    }
     whitePoint        = 0;
     topMargin         = 0;
     leftMargin        = 0;
@@ -86,6 +90,14 @@
         rawColors        == -1          &&
         rawImages        == -1          &&
         blackPoint       == 0           &&
+        blackPointCh[0]  == 0           &&
+        blackPointCh[1]  == 0           &&
+        blackPointCh[2]  == 0           &&
+        blackPointCh[3]  == 0           &&
+        blackPointCh[4]  == 0           &&
+        blackPointCh[5]  == 0           &&
+        blackPointCh[6]  == 0           &&
+        blackPointCh[7]  == 0           &&
         whitePoint       == 0           &&
         topMargin        == 0           &&
         leftMargin       == 0           &&
@@ -158,7 +170,6 @@
     dbg.nospace() << "DcrawInfoContainer::cameraMult: "       << c.cameraMult << ", \
                ";
     dbg.nospace() << "DcrawInfoContainer::blackPoint: "       << c.blackPoint << ", \
                ";
     dbg.nospace() << "DcrawInfoContainer::whitePoint: "       << c.whitePoint << ", \
                ";
-    dbg.nospace() << "DcrawInfoContainer::blackPoint: "       << c.blackPoint << ", \
                ";
     dbg.nospace() << "DcrawInfoContainer::topMargin: "        << c.topMargin << ", \
                ";
     dbg.nospace() << "DcrawInfoContainer::leftMargin: "       << c.leftMargin << ", \
                ";
     dbg.nospace() << "DcrawInfoContainer::rightMargin: "      << c.rightMargin << ", \
                ";
--- branches/extragear/graphics/libkdcraw/libkdcraw/dcrawinfocontainer.h \
#1200786:1200787 @@ -83,6 +83,9 @@
     /** Black level from Raw histogram. */
     unsigned int     blackPoint;
 
+    /** Channel black levels from Raw histogram. */
+    unsigned int     blackPointCh[8];
+
     /** White level from Raw histogram. */
     unsigned int     whitePoint;
 
--- branches/extragear/graphics/libkdcraw/libkdcraw/kdcraw_p.cpp #1200786:1200787
@@ -119,8 +119,11 @@
     identify.pixelAspectRatio = raw->imgdata.sizes.pixel_aspect;
     identify.rawColors        = raw->imgdata.idata.colors;
     identify.rawImages        = raw->imgdata.idata.raw_count;
-    //TODO: provide per channel black point with next interface change
     identify.blackPoint       = raw->imgdata.color.black;
+    for (int ch = 0; ch < 8; ch++)
+    {
+        identify.blackPointCh[ch] = raw->imgdata.color.cblack[ch];
+    }
     identify.whitePoint       = raw->imgdata.color.maximum;
     identify.orientation      = \
                (DcrawInfoContainer::ImageOrientation)raw->imgdata.sizes.flip;
     memcpy(&identify.cameraColorMatrix1, &raw->imgdata.color.cmatrix, \
sizeof(raw->imgdata.color.cmatrix));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic