mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 11:42:36 +01:00
Prefer using block
This commit is contained in:
parent
71ce198e5e
commit
6f3d1db27a
@ -95,9 +95,10 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
var bmp = new Bitmap(Width, Height);
|
var bmp = new Bitmap(Width, Height);
|
||||||
if (fourColors[0] != Color.Transparent)
|
if (fourColors[0] != Color.Transparent)
|
||||||
{
|
{
|
||||||
var gr = Graphics.FromImage(bmp);
|
using (var gr = Graphics.FromImage(bmp))
|
||||||
gr.FillRectangle(new SolidBrush(fourColors[0]), new Rectangle(0, 0, bmp.Width, bmp.Height));
|
{
|
||||||
gr.Dispose();
|
gr.FillRectangle(new SolidBrush(fourColors[0]), new Rectangle(0, 0, bmp.Width, bmp.Height));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var fastBmp = new FastBitmap(bmp);
|
var fastBmp = new FastBitmap(bmp);
|
||||||
fastBmp.LockImage();
|
fastBmp.LockImage();
|
||||||
|
Loading…
Reference in New Issue
Block a user