mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +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);
|
||||
if (fourColors[0] != Color.Transparent)
|
||||
{
|
||||
var gr = Graphics.FromImage(bmp);
|
||||
gr.FillRectangle(new SolidBrush(fourColors[0]), new Rectangle(0, 0, bmp.Width, bmp.Height));
|
||||
gr.Dispose();
|
||||
using (var gr = Graphics.FromImage(bmp))
|
||||
{
|
||||
gr.FillRectangle(new SolidBrush(fourColors[0]), new Rectangle(0, 0, bmp.Width, bmp.Height));
|
||||
}
|
||||
}
|
||||
var fastBmp = new FastBitmap(bmp);
|
||||
fastBmp.LockImage();
|
||||
|
Loading…
Reference in New Issue
Block a user