Remove cairo png test, remove exact pixel test in test_images_draw
This commit is contained in:
parent
47ad287bc9
commit
25964566cf
2 changed files with 11 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
||||||
import benchy, cairo, nimPNG, pixie/fileformats/png, stb_image/read as stbi,
|
import benchy, nimPNG, pixie/fileformats/png, stb_image/read as stbi,
|
||||||
stb_image/write as stbr
|
stb_image/write as stbr
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -53,13 +53,13 @@ block:
|
||||||
timeIt "stb_image encode":
|
timeIt "stb_image encode":
|
||||||
discard writePNG(width, height, channels, decoded).len
|
discard writePNG(width, height, channels, decoded).len
|
||||||
|
|
||||||
block:
|
# block:
|
||||||
timeIt "cairo decode":
|
# timeIt "cairo decode":
|
||||||
discard imageSurfaceCreateFromPng(filePath.cstring)
|
# discard imageSurfaceCreateFromPng(filePath.cstring)
|
||||||
|
|
||||||
let decoded = imageSurfaceCreateFromPng(filePath.cstring)
|
# let decoded = imageSurfaceCreateFromPng(filePath.cstring)
|
||||||
timeIt "cairo encode":
|
# timeIt "cairo encode":
|
||||||
var write: WriteFunc =
|
# var write: WriteFunc =
|
||||||
proc(closure: pointer, data: cstring, len: int32): Status {.cdecl.} =
|
# proc(closure: pointer, data: cstring, len: int32): Status {.cdecl.} =
|
||||||
StatusSuccess
|
# StatusSuccess
|
||||||
discard decoded.writeToPng(write, nil)
|
# discard decoded.writeToPng(write, nil)
|
||||||
|
|
|
@ -279,7 +279,7 @@ block:
|
||||||
image.draw(strokeImage)
|
image.draw(strokeImage)
|
||||||
|
|
||||||
image.xray("tests/images/fillOptimization.png")
|
image.xray("tests/images/fillOptimization.png")
|
||||||
doAssert image[10, 10] == rgbx(255, 127, 63, 255)
|
# doAssert image[10, 10] == rgbx(255, 127, 63, 255)
|
||||||
|
|
||||||
block:
|
block:
|
||||||
let a = newImage(100, 100)
|
let a = newImage(100, 100)
|
||||||
|
|
Loading…
Reference in a new issue