(BmpFormat.EnableExtensions): new field.

This commit is contained in:
morkt 2016-09-07 20:25:26 +04:00
parent f6b729e5d9
commit 07affe292c

View File

@ -57,10 +57,12 @@ namespace GameRes
private IEnumerable<IBmpExtension> m_extensions; private IEnumerable<IBmpExtension> m_extensions;
#pragma warning restore 649 #pragma warning restore 649
bool EnableExtensions = true;
public override ImageData Read (Stream file, ImageMetaData info) public override ImageData Read (Stream file, ImageMetaData info)
{ {
var bmp_info = info as BmpMetaData; var bmp_info = info as BmpMetaData;
if (bmp_info != null) if (bmp_info != null && EnableExtensions)
{ {
bool can_seek = file.CanSeek; bool can_seek = file.CanSeek;
foreach (var ext in m_extensions) foreach (var ext in m_extensions)