From 8aa36b9c0a1d2e89aef5ee7a43c0470f1745cb54 Mon Sep 17 00:00:00 2001 From: "Simon A. Eugster" Date: Fri, 3 Sep 2010 08:35:25 +0000 Subject: [PATCH] RGB Plane export fixed for scale < 1 http://www.kdenlive.org/mantis/view.php?id=1793 svn path=/trunk/kdenlive/; revision=4821 --- src/colortools.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/colortools.cpp b/src/colortools.cpp index 9f8b4806..6e44a334 100644 --- a/src/colortools.cpp +++ b/src/colortools.cpp @@ -148,15 +148,19 @@ QImage ColorTools::rgbCurvePlane(const QSize &size, const ColorTools::ColorsRGB const int h = size.height(); double dcol, dval; + double dx, dy; for (int x = 0; x < w; x++) { dval = (double)255*x/(w-1); for (int y = 0; y < h; y++) { + dy = (double)y/(h-1); + dx = (double)x/(w-1); + if (1-scaling < 0.0001) { - dcol = (double)255*y/(h-1); + dcol = (double)255*dy; } else { - dcol = (double)255 * (y - (y-x)*(1-scaling))/(h-1); + dcol = (double)255 * (dy - (dy-dx)*(1-scaling)); } if (color == ColorTools::COL_R) { -- 2.39.2