kirinnee / MinIMage

C# .NET Core Wrapper to Programmatically call image compression algorithms
MIT License
19 stars 8 forks source link

PngQuant.Compress freeze when picture has less than 4000 bytes #1

Open FilX opened 4 years ago

FilX commented 4 years ago

Image which has less than 4000 bytes is not possible compress by PngQuant from c#. But when it's called pngquant.exe in console directly it works. I think there is problem in PngQuant.CompressImplementation in await pro.StandardOutput.BaseStream.CopyToAsync(outputStream); line

Code example

var pngQuant = new PngQuant(); var image = File.ReadAllBytes(@"C:\\Temp\\Images\\testx.png"); var compressed = pngQuant.Compress(image).GetAwaiter().GetResult();

testx

kirinnee commented 4 years ago

Hi, I am aware of this problem. This is a mirror repository, could you open an issue in my main repository in GitLab (with CI CD and stuffs) Thanks!

https://gitlab.com/nuget-packages/minimage

FilX commented 4 years ago

It was resolved here: https://github.com/kornelski/pngquant/issues/348#issuecomment-554283563