forked from swharden/Spectrogram
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathImage.cs
More file actions
26 lines (23 loc) · 719 Bytes
/
Image.cs
File metadata and controls
26 lines (23 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Collections.Generic;
using SkiaSharp;
namespace Spectrogram
{
public static class Image
{
public static SKBitmap GetBitmap(List<double[]> ffts, Colormap cmap, double intensity = 1,
bool dB = false, double dBScale = 1, bool roll = false, int rollOffset = 0, bool rotate = false)
{
ImageMaker maker = new()
{
Colormap = cmap,
Intensity = intensity,
IsDecibel = dB,
DecibelScaleFactor = dBScale,
IsRoll = roll,
RollOffset = rollOffset,
IsRotated = rotate,
};
return maker.GetBitmap(ffts);
}
}
}