Error: cannot read PNG from stdin
pngqu opened this issue · comments
Hola,
Running it on Windows:
posterize.exe -q 90 < before.png > after.png
I got: "Error: cannot read PNG from stdin".
Perhaps it's the LF<>CRLF conversion done in "text mode". Try setting binary mode, like pngquant does:
https://github.com/pornel/improved-pngquant/blob/master/pngquant.c#L860
Sorry but i do not understand (im not a programmer). I need some help please. I've tried:
- posterize -q 90 -d 16 ^< before.png ^> after.png, that gives the program usage.
If i have to modify something in the posterize.c, i do not know what i've to change.
Thanks in avance.
Try compiling code from this branch:
Can you share the compiled executable?
Posterization gives best compression when it's applied to all channels. If something looks bad, then increase number of posterization levels.
Latest version has better handling of gamma correction, which improves alpha at the same time