[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: AutoContrast filter histogram calculation bug
From: William Steidtmann <billstei () hbci ! com>
Date: 2010-12-02 20:26:04
Message-ID: 4CF800DC.4020904 () hbci ! com
[Download RAW message or body]
Attached is a patch that fixes the AutoContrast filter to use the image
bounds rather than exactBounds when obtaining histogram data, however
there is an additional bug that occurs after the Apply button is
pressed, which causes the transfer function (which should now be
correct) to apply incorrectly. It is not clear to me why this
additional bug exists.
William Steidtmann
["AutoContrastHistogramCalcPatch1.patch" (text/x-patch)]
Index: krita/plugins/filters/colorsfilters/colorsfilters.cpp
===================================================================
--- krita/plugins/filters/colorsfilters/colorsfilters.cpp (revision 1202933)
+++ krita/plugins/filters/colorsfilters/colorsfilters.cpp (working copy)
@@ -111,12 +111,13 @@
KisPaintDeviceSP dst = dstInfo.paintDevice();
QPoint dstTopLeft = dstInfo.topLeft();
QPoint srcTopLeft = srcInfo.topLeft();
+ QRect bounds(srcTopLeft, size);
Q_ASSERT(src != 0);
Q_ASSERT(dst != 0);
Q_UNUSED(config);
// initialize
KoHistogramProducerSP producer = KoHistogramProducerSP(new KoGenericLabHistogramProducer());
- KisHistogram histogram(src, src->exactBounds(), producer, LINEAR);
+ KisHistogram histogram(src, bounds, producer, LINEAR);
int minvalue = int(255 * histogram.calculations().getMin() + 0.5);
int maxvalue = int(255 * histogram.calculations().getMax() + 0.5);
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic