mirror of
https://github.com/status-im/nimPNG.git
synced 2025-02-13 21:16:22 +00:00
Merge pull request #43 from jangko/fix_hash_function
fix #42, bad RGBA8 hash proc
This commit is contained in:
commit
d7d413c837
@ -80,7 +80,7 @@ install:
|
|||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cd C:\projects\%APPVEYOR_PROJECT_SLUG%
|
- cd C:\projects\%APPVEYOR_PROJECT_SLUG%
|
||||||
#- nimble install -y > nul
|
- nimble install -y > nul
|
||||||
test_script:
|
test_script:
|
||||||
- nimble tests
|
- nimble tests
|
||||||
|
|
||||||
|
@ -1279,6 +1279,7 @@ proc hash*(c: RGBA8): Hash =
|
|||||||
h = h !& ord(c.g)
|
h = h !& ord(c.g)
|
||||||
h = h !& ord(c.b)
|
h = h !& ord(c.b)
|
||||||
h = h !& ord(c.a)
|
h = h !& ord(c.a)
|
||||||
|
result = !$(h)
|
||||||
|
|
||||||
proc RGBA8FromGrey8[T](p: var RGBA8, input: openArray[T], px: int, mode: PNGColorMode) =
|
proc RGBA8FromGrey8[T](p: var RGBA8, input: openArray[T], px: int, mode: PNGColorMode) =
|
||||||
p.r = input[px]
|
p.r = input[px]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user