mirror of
https://github.com/miek/inspectrum.git
synced 2026-03-03 06:54:17 +01:00
spectrogram: Fix inverted spectrogram
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user