jpeg version

This commit is contained in:
Ryan Oldenburg 2022-05-12 18:47:53 -05:00
parent 159f1b38f9
commit 35efcf1495

View file

@ -1,4 +1,4 @@
import jpegsuite, pixie/common, pixie/fileformats/jpg, random, strformat import jpegsuite, pixie/common, pixie/fileformats/jpeg, random, strformat
randomize() randomize()
@ -12,13 +12,13 @@ for i in 0 ..< 10_000:
echo &"{i} {file} {pos} {value}" echo &"{i} {file} {pos} {value}"
try: try:
let img = decodeJpg(data) let img = decodeJpeg(data)
doAssert img.height > 0 and img.width > 0 doAssert img.height > 0 and img.width > 0
except PixieError: except PixieError:
discard discard
data = data[0 ..< pos] data = data[0 ..< pos]
try: try:
let img = decodeJpg(data) let img = decodeJpeg(data)
doAssert img.height > 0 and img.width > 0 doAssert img.height > 0 and img.width > 0
except PixieError: except PixieError:
discard discard