jpeg version
This commit is contained in:
parent
159f1b38f9
commit
35efcf1495
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue