mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 04:18:43 +00:00
Fixed magic number check for bitmap
This commit is contained in:
parent
ea1a14132e
commit
b5f4e054fe
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ namespace Cosmos.System.Graphics
|
|||
|
||||
//reading magic number to identify if BMP file (BM as string - 42 4D as Hex) - bytes 0 -> 2
|
||||
stream.Read(_short, 0, 2);
|
||||
if (0x424d != BitConverter.ToInt16(_short, 0))
|
||||
if ("42-4D" != BitConverter.ToString(_short))
|
||||
throw new Exception("Header is not from a BMP");
|
||||
|
||||
//read size of BMP file - byte 2 -> 6
|
||||
|
|
|
|||
Loading…
Reference in a new issue