Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API – can't savePNG32 with a seq[uint8] #49

Closed
liquidev opened this issue Jun 19, 2020 · 2 comments
Closed

New API – can't savePNG32 with a seq[uint8] #49

liquidev opened this issue Jun 19, 2020 · 2 comments

Comments

@liquidev
Copy link

due to a type mismatch.

Here's the error message:

/home/daknus/Coding/Nim/aglet/tests/tcloud.nim(145, 29) template/generic instantiation of `savePNG32` from here
/home/daknus/.nimble/pkgs/nimPNG-0.3.0/nimPNG.nim(3104, 20) template/generic instantiation of `savePNG32Impl` from here
/home/daknus/.nimble/pkgs/nimPNG-0.3.0/nimPNG.nim(2980, 16) template/generic instantiation of `savePNGImpl` from here
/home/daknus/.nimble/pkgs/nimPNG-0.3.0/nimPNG.nim(2971, 26) template/generic instantiation of `encodePNG` from here
/home/daknus/.nimble/pkgs/nimPNG-0.3.0/nimPNG.nim(2942, 21) template/generic instantiation of `encodePNG` from here
/home/daknus/.nimble/pkgs/nimPNG-0.3.0/nimPNG.nim(2929, 17) template/generic instantiation of `encoderCore` from here
/home/daknus/.nimble/pkgs/nimPNG-0.3.0/nimPNG.nim(2838, 8) template/generic instantiation of `autoChooseColor` from here
/home/daknus/.nimble/pkgs/nimPNG-0.3.0/nimPNG.nim(2518, 17) template/generic instantiation of `getColorProfile` from here
/home/daknus/.nimble/pkgs/nimPNG-0.3.0/nimPNG.nim(2503, 24) Error: type mismatch: got <seq[uint8], int, int, PNGColorMode, PNGColorProfile, Table[nimPNG.RGBA8, system.int]>
but expected one of:
proc calculateColorProfile(input: string; w, h: int; mode: PNGColorMode;
                          prof: PNGColorProfile; tree: var Table[RGBA8, int])
  first type mismatch at position: 1
  required type for input: string
  but expression 'png.pixels' is of type: seq[uint8]

expression: calculateColorProfile(png.pixels, png.width, png.height, mode, prof, tree)
@jangko
Copy link
Owner

jangko commented Jun 20, 2020

please try new v0.3.1 release

@liquidev
Copy link
Author

Seems to work fine now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants