(ImageFormatDecoder.Create): new static method.

This commit is contained in:
morkt 2018-08-31 04:41:02 +04:00
parent 3c023d1b6b
commit 7f5d2c9b24

View File

@ -87,6 +87,23 @@ namespace GameRes
Info = info;
}
/// <summary>
/// Create instance of ImageFormatDecoder from input binary stream.
/// In case of error input stream is disposed.
/// </summary>
public static ImageFormatDecoder Create (IBinaryStream input)
{
try
{
return new ImageFormatDecoder (input);
}
catch
{
input.Dispose();
throw;
}
}
bool m_disposed = false;
public void Dispose ()
{