test_gif
This commit is contained in:
parent
d2d2fc636f
commit
85b46fdf49
|
@ -1,11 +1,11 @@
|
|||
import pixie, pixie/fileformats/gif
|
||||
import pixie, pixie/fileformats/gif, utils
|
||||
|
||||
block:
|
||||
let
|
||||
path = "tests/fileformats/gif/3x5.gif"
|
||||
image = readImage(path)
|
||||
dimensions = decodeGifDimensions(readFile(path))
|
||||
image.writeFile("tests/fileformats/gif/3x5.png")
|
||||
image.diffVs("tests/fileformats/gif/3x5.png")
|
||||
doAssert image.width == dimensions.width
|
||||
doAssert image.height == dimensions.height
|
||||
|
||||
|
@ -14,7 +14,7 @@ block:
|
|||
path = "tests/fileformats/gif/audrey.gif"
|
||||
image = readImage(path)
|
||||
dimensions = decodeGifDimensions(readFile(path))
|
||||
image.writeFile("tests/fileformats/gif/audrey.png")
|
||||
image.diffVs("tests/fileformats/gif/audrey.png")
|
||||
doAssert image.width == dimensions.width
|
||||
doAssert image.height == dimensions.height
|
||||
|
||||
|
@ -23,7 +23,7 @@ block:
|
|||
path = "tests/fileformats/gif/sunflower.gif"
|
||||
image = readImage(path)
|
||||
dimensions = decodeGifDimensions(readFile(path))
|
||||
image.writeFile("tests/fileformats/gif/sunflower.png")
|
||||
image.diffVs("tests/fileformats/gif/sunflower.png")
|
||||
doAssert image.width == dimensions.width
|
||||
doAssert image.height == dimensions.height
|
||||
|
||||
|
@ -32,13 +32,13 @@ block:
|
|||
path = "tests/fileformats/gif/sunflower.gif"
|
||||
image = readImage(path)
|
||||
dimensions = decodeGifDimensions(readFile(path))
|
||||
image.writeFile("tests/fileformats/gif/sunflower.png")
|
||||
image.diffVs("tests/fileformats/gif/sunflower.png")
|
||||
doAssert image.width == dimensions.width
|
||||
doAssert image.height == dimensions.height
|
||||
|
||||
block:
|
||||
let img4 = readImage("tests/fileformats/gif/newtons_cradle.gif")
|
||||
img4.writeFile("tests/fileformats/gif/newtons_cradle.png")
|
||||
img4.diffVs("tests/fileformats/gif/newtons_cradle.png")
|
||||
|
||||
let animatedGif =
|
||||
decodeGif(readFile("tests/fileformats/gif/newtons_cradle.gif"))
|
||||
|
|
Loading…
Reference in a new issue