diff --git a/src/Logic/BluRaySup/BluRaySupPicture.cs b/src/Logic/BluRaySup/BluRaySupPicture.cs
index c99460d04..1e34362cb 100644
--- a/src/Logic/BluRaySup/BluRaySupPicture.cs
+++ b/src/Logic/BluRaySup/BluRaySupPicture.cs
@@ -191,13 +191,12 @@ namespace Nikse.SubtitleEdit.Logic.BluRaySup
///
/// bitmap to compress
/// RLE buffer
- private static byte[] EncodeImage(Bitmap bm, Dictionary palette)
+ private static byte[] EncodeImage(NikseBitmap bm, Dictionary palette)
{
var bytes = new List();
byte color = 0;
int ofs = 0;
int len = 0;
- //boolean eol;
for (int y = 0; y < bm.Height; y++)
{
ofs = y * bm.Width;
@@ -289,7 +288,7 @@ namespace Nikse.SubtitleEdit.Logic.BluRaySup
return (byte)smallestDiffIndex;
}
- private static Dictionary GetBitmapPalette(Bitmap bitmap)
+ private static Dictionary GetBitmapPalette(NikseBitmap bitmap)
{
var pal = new Dictionary();
for (int y = 0; y < bitmap.Height; y++)
@@ -334,8 +333,9 @@ namespace Nikse.SubtitleEdit.Logic.BluRaySup
/// frames per second
/// image bottom margin
/// byte buffer containing the binary stream representation of one caption
- public static byte[] CreateSupFrame(BluRaySupPicture pic, Bitmap bm, double fps, int bottomMargin, ContentAlignment alignment)
+ public static byte[] CreateSupFrame(BluRaySupPicture pic, Bitmap bmp, double fps, int bottomMargin, ContentAlignment alignment)
{
+ var bm = new NikseBitmap(bmp);
var colorPalette = GetBitmapPalette(bm);
var pal = new BluRaySupPalette(colorPalette.Count);
int k = 0;