mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 14:32:35 +01:00
Another fix for image splitter
This commit is contained in:
parent
12b30549e0
commit
8437695425
@ -1363,7 +1363,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
for (int y = 0; y < Height; y++)
|
||||
{
|
||||
var isLineTransparent = IsLineTransparent(y);
|
||||
if (startY == y && !isLineTransparent)
|
||||
if (startY == y && isLineTransparent)
|
||||
{
|
||||
startY++;
|
||||
continue;
|
||||
@ -1379,7 +1379,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
}
|
||||
}
|
||||
|
||||
return startY - transparentBottomPixels;
|
||||
return Height - startY - transparentBottomPixels;
|
||||
}
|
||||
|
||||
|
||||
|
@ -522,7 +522,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
}
|
||||
}
|
||||
|
||||
if (bmp.Height - startY > minLineHeight)
|
||||
if (bmp.Height - startY > 1)
|
||||
{
|
||||
var part = bmp.CopyRectangle(new Rectangle(0, startY, bmp.Width, bmp.Height - startY));
|
||||
if (!part.IsImageOnlyTransparent())
|
||||
@ -722,7 +722,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
}
|
||||
}
|
||||
|
||||
if (bmp.Height - startY > minLineHeight && parts.Count > 0)
|
||||
if (bmp.Height - startY > 1 && parts.Count > 0)
|
||||
{
|
||||
var part = bmp.CopyRectangle(new Rectangle(0, startY, bmp.Width, bmp.Height - startY));
|
||||
if (!part.IsImageOnlyTransparent())
|
||||
|
Loading…
Reference in New Issue
Block a user