f
This commit is contained in:
parent
e3e94cff85
commit
f978516b39
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ proc decodeBmp*(data: string): Image =
|
||||||
raise newException(PixieError, "Unsupported BMP data format")
|
raise newException(PixieError, "Unsupported BMP data format")
|
||||||
|
|
||||||
if compression notin [0, 3]:
|
if compression notin [0, 3]:
|
||||||
raise newException(PixieError, "Invalid BMP data format")
|
raise newException(PixieError, "Unsupported BMP data format")
|
||||||
|
|
||||||
let channels = if bits == 32: 4 else: 3
|
let channels = if bits == 32: 4 else: 3
|
||||||
if width * height * channels + offset > data.len:
|
if width * height * channels + offset > data.len:
|
||||||
|
|
Loading…
Reference in a new issue