mirror of https://github.com/status-im/nimPNG.git
remove warning
This commit is contained in:
parent
c55008c163
commit
55a444cf5a
|
@ -1179,7 +1179,7 @@ proc nzDeflate(nz: nzStream) =
|
|||
var blocksize = 0
|
||||
var insize = nz.data.len
|
||||
|
||||
if nz.btype > 2: raise newNZError("invalid block type")
|
||||
if nz.btype > 2: raise newNZError("invalid block type")
|
||||
elif nz.btype == 0:
|
||||
nz.deflateNoCompression
|
||||
return
|
||||
|
|
|
@ -109,9 +109,9 @@ proc testOtherPattern1() =
|
|||
|
||||
for y in 0..h-1:
|
||||
for x in 0..w-1:
|
||||
image.data[4 * w * y + 4 * x + 0] = chr(int(127 * (1 + math.sin(float( x * x + y * y) / (float(w * h) / 8.0)))))
|
||||
image.data[4 * w * y + 4 * x + 1] = chr(int(127 * (1 + math.sin(float((w - x - 1) * (w - x - 1) + y * y) / (float(w * h) / 8.0)))))
|
||||
image.data[4 * w * y + 4 * x + 2] = chr(int(127 * (1 + math.sin(float( x * x + (h - y - 1) * (h - y - 1)) / (float(w * h) / 8.0)))))
|
||||
image.data[4 * w * y + 4 * x + 0] = chr(int(127 * (1 + math.sin(float(x * x + y * y) / (float(w * h) / 8.0)))))
|
||||
image.data[4 * w * y + 4 * x + 1] = chr(int(127 * (1 + math.sin(float((w - x - 1) * (w - x - 1) + y * y) / (float(w * h) / 8.0)))))
|
||||
image.data[4 * w * y + 4 * x + 2] = chr(int(127 * (1 + math.sin(float(x * x + (h - y - 1) * (h - y - 1)) / (float(w * h) / 8.0)))))
|
||||
image.data[4 * w * y + 4 * x + 3] = chr(int(127 * (1 + math.sin(float((w - x - 1) * (w - x - 1) + (h - y - 1) * (h - y - 1)) / (float(w * h) / 8.0)))))
|
||||
|
||||
doCodecTest(image)
|
||||
|
|
Loading…
Reference in New Issue