From 24200c47fa17ded56c1ea439840767c631f51581 Mon Sep 17 00:00:00 2001 From: zvezdochiot Date: Sun, 3 Jan 2021 20:48:24 +0300 Subject: [PATCH] fix https://github.com/ksharindam/photoquick/issues/7 : v4.3.7 release --- src/colors/grayscale-local/color2gray.cpp | 1 + src/colors/grayscale-local/grayscale-local.pro | 2 +- src/colors/invert/invert.pro | 2 +- src/colors/kuwahara/kuwahara.pro | 2 +- src/colors/quant/quant.pro | 2 +- src/colors/stretch-histogram/stretch-histogram.pro | 2 +- src/colors/tone-mapping/tone-mapping.pro | 2 +- src/colors/unalpha/unalpha.pro | 2 +- src/threshold/bimodal-threshold/bimodal-threshold.pro | 2 +- src/threshold/dither/dither.pro | 2 +- src/threshold/threshold-bg-scale/threshold-bg-scale.pro | 2 +- src/threshold/threshold-bg-scale/threshold_bg_scale.cpp | 3 ++- src/tools/histogram-viewer/histogram-viewer.pro | 2 +- src/transform/pixart-scaler/pixart-scaler.pro | 2 +- src/transform/pixart-scaler/xbr.cpp | 6 +++--- src/transform/ris-scaler/ris-scaler.pro | 2 +- 16 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/colors/grayscale-local/color2gray.cpp b/src/colors/grayscale-local/color2gray.cpp index f203732..c84c003 100644 --- a/src/colors/grayscale-local/color2gray.cpp +++ b/src/colors/grayscale-local/color2gray.cpp @@ -13,6 +13,7 @@ Color to grayscale conversion, uses envelopes formed with the STRESS approach */ #include #include +#include inline float srgb_to_linear(float value) { diff --git a/src/colors/grayscale-local/grayscale-local.pro b/src/colors/grayscale-local/grayscale-local.pro index 1f2775c..6aa62b7 100644 --- a/src/colors/grayscale-local/grayscale-local.pro +++ b/src/colors/grayscale-local/grayscale-local.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/colors/invert/invert.pro b/src/colors/invert/invert.pro index 25c8525..192b093 100644 --- a/src/colors/invert/invert.pro +++ b/src/colors/invert/invert.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/colors/kuwahara/kuwahara.pro b/src/colors/kuwahara/kuwahara.pro index 5d3fc38..4e58278 100644 --- a/src/colors/kuwahara/kuwahara.pro +++ b/src/colors/kuwahara/kuwahara.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/colors/quant/quant.pro b/src/colors/quant/quant.pro index e0bdb37..82c3a0b 100644 --- a/src/colors/quant/quant.pro +++ b/src/colors/quant/quant.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/colors/stretch-histogram/stretch-histogram.pro b/src/colors/stretch-histogram/stretch-histogram.pro index 4e12317..23791e9 100644 --- a/src/colors/stretch-histogram/stretch-histogram.pro +++ b/src/colors/stretch-histogram/stretch-histogram.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/colors/tone-mapping/tone-mapping.pro b/src/colors/tone-mapping/tone-mapping.pro index fd15720..099e2d0 100644 --- a/src/colors/tone-mapping/tone-mapping.pro +++ b/src/colors/tone-mapping/tone-mapping.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/colors/unalpha/unalpha.pro b/src/colors/unalpha/unalpha.pro index 4079c8e..f540cab 100644 --- a/src/colors/unalpha/unalpha.pro +++ b/src/colors/unalpha/unalpha.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/threshold/bimodal-threshold/bimodal-threshold.pro b/src/threshold/bimodal-threshold/bimodal-threshold.pro index 6023663..538f734 100644 --- a/src/threshold/bimodal-threshold/bimodal-threshold.pro +++ b/src/threshold/bimodal-threshold/bimodal-threshold.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/threshold/dither/dither.pro b/src/threshold/dither/dither.pro index 09cf107..6fc4717 100644 --- a/src/threshold/dither/dither.pro +++ b/src/threshold/dither/dither.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/threshold/threshold-bg-scale/threshold-bg-scale.pro b/src/threshold/threshold-bg-scale/threshold-bg-scale.pro index ec3706e..f837042 100644 --- a/src/threshold/threshold-bg-scale/threshold-bg-scale.pro +++ b/src/threshold/threshold-bg-scale/threshold-bg-scale.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/threshold/threshold-bg-scale/threshold_bg_scale.cpp b/src/threshold/threshold-bg-scale/threshold_bg_scale.cpp index f16d29c..23fd460 100644 --- a/src/threshold/threshold-bg-scale/threshold_bg_scale.cpp +++ b/src/threshold/threshold-bg-scale/threshold_bg_scale.cpp @@ -31,10 +31,11 @@ void thresholdBgScale(QImage &img, int thresh, int scaledW) g -= qGreen(line[x]); b = qBlue(lineScaled[x]); b -= qBlue(line[x]); + a = qAlpha(line[x]); r = (r > thresh) ? 0 : 255; g = (g > thresh) ? 0 : 255; b = (b > thresh) ? 0 : 255; - line[x] = qRgba(r, g, b, qAlpha(line[x])); + line[x] = qRgba(r, g, b, a); } } } diff --git a/src/tools/histogram-viewer/histogram-viewer.pro b/src/tools/histogram-viewer/histogram-viewer.pro index d802344..99eec2e 100644 --- a/src/tools/histogram-viewer/histogram-viewer.pro +++ b/src/tools/histogram-viewer/histogram-viewer.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/transform/pixart-scaler/pixart-scaler.pro b/src/transform/pixart-scaler/pixart-scaler.pro index 0919eb4..6170b9e 100644 --- a/src/transform/pixart-scaler/pixart-scaler.pro +++ b/src/transform/pixart-scaler/pixart-scaler.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug diff --git a/src/transform/pixart-scaler/xbr.cpp b/src/transform/pixart-scaler/xbr.cpp index 4c3d817..e23031e 100644 --- a/src/transform/pixart-scaler/xbr.cpp +++ b/src/transform/pixart-scaler/xbr.cpp @@ -54,9 +54,9 @@ int rgb2yuv(uint32_t x) int g = GREEN(x); int rg = RED(x) - GREEN(x); int bg = BLUE(x) - GREEN(x); - uint y = (uint)(( 299*rg + 1000*g + 114*bg)/1000); - uint u = (uint)((-169*rg + 500*bg)/1000) + 128; - uint v = (uint)(( 500*rg - 81*bg)/1000) + 128; + int y = (int)(( 299*rg + 1000*g + 114*bg)/1000); + int u = (int)((-169*rg + 500*bg)/1000) + 128; + int v = (int)(( 500*rg - 81*bg)/1000) + 128; return (y << 16) + (u << 8) + v; } diff --git a/src/transform/ris-scaler/ris-scaler.pro b/src/transform/ris-scaler/ris-scaler.pro index b39325e..5ad9b5d 100644 --- a/src/transform/ris-scaler/ris-scaler.pro +++ b/src/transform/ris-scaler/ris-scaler.pro @@ -19,4 +19,4 @@ unix { target.path = /usr/local/share/photoquick/plugins } -CONFIG -= debug_and_release +CONFIG -= debug_and_release debug