We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ee7b22 commit 5d9dc0fCopy full SHA for 5d9dc0f
src/Spectrogram/ImageMaker.cs
@@ -82,9 +82,13 @@ public Bitmap GetBitmap(List<double[]> ffts)
82
83
for (int row = 0; row < Height; row++)
84
{
85
- double value = IsRotated ? ffts[row][sourceCol] : ffts[sourceCol][row];
+ double value = IsRotated
86
+ ? ffts[Height - row - 1][sourceCol]
87
+ : ffts[sourceCol][row];
88
+
89
if (IsDecibel)
90
value = 20 * Math.Log10(value * DecibelScaleFactor + 1);
91
92
value *= Intensity;
93
value = Math.Min(value, 255);
94
int bytePosition = (Height - 1 - row) * stride + col;
0 commit comments