From d78986a978e248e8576d3b1d98e6a5e25dd9fded Mon Sep 17 00:00:00 2001 From: Mike Walters Date: Fri, 4 Mar 2016 00:14:57 +0000 Subject: [PATCH] spectrogram: Fix inverted spectrogram --- spectrogramplot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spectrogramplot.cpp b/spectrogramplot.cpp index 95c2955..09d90b6 100644 --- a/spectrogramplot.cpp +++ b/spectrogramplot.cpp @@ -133,7 +133,7 @@ QPixmap* SpectrogramPlot::getPixmapTile(off_t tile) float normPower = (line[y] - powerMax) * -1.0f / powerRange; normPower = clamp(normPower, 0.0f, 1.0f); - image.setPixel(x, y, colormap[(uint8_t)(normPower * (256 - 1))]); + image.setPixel(x, fftSize - y - 1, colormap[(uint8_t)(normPower * (256 - 1))]); } } obj->convertFromImage(image);