diff --git a/MarketData/MarketDataLib/CNNProcessing/ImageHelper.cs b/MarketData/MarketDataLib/CNNProcessing/ImageHelper.cs
index aed5f53..9931baa 100644
--- a/MarketData/MarketDataLib/CNNProcessing/ImageHelper.cs
+++ b/MarketData/MarketDataLib/CNNProcessing/ImageHelper.cs
@@ -414,9 +414,26 @@ namespace MarketData.CNNProcessing
///
public void Fill(SKColor color)
{
+ Validate();
SKRectI rect = new SKRectI(0, 0, Width, Height); // x, y, width, height
bitmap.Erase(color, rect);
}
+
+ ///
+ /// Make the bitmap transparent
+ ///
+ public void Transparent(SKColor color)
+ {
+ Validate();
+ int pixelCount = Width * Height;
+ SKColor[] colors = new SKColor[pixelCount];
+ SKColor transparent = new SKColor(color.Red, color.Green, color.Blue, 0);
+ for (int index = 0; index < pixelCount; index++)
+ {
+ colors[index] = transparent;
+ }
+ bitmap.Pixels = colors;
+ }
///
/// DrawPoint - With translation