h2non / bimg

Go package for fast high-level image processing powered by libvips C library
https://pkg.go.dev/github.com/h2non/bimg?tab=doc
MIT License
2.68k stars 337 forks source link

The compression option does not take effect #386

Closed guowei-gong closed 2 years ago

guowei-gong commented 2 years ago

go version go1.16.6 darwin/amd64 I installed other dependencies through brew install.

I use a picture in jpg format as the input source, everything works fine.Through the quality option, the image size has become smaller.

code: image

result: image

When I try to compress pictures in png format, its compression effect is very poor.

code: image

result: image

If I change the Compression option to 1, its image size becomes larger?

code: image

result: image

Thank you in advance for your help. My English is not very good.

rockmantist commented 2 years ago

Hey did you found the fix on this ? i have the same issue as you, my image became larger when i put the compression

Aldiwildan77 commented 2 years ago

This issue closed without a solution @guowei-gong? Can u provide your solution?

guowei-gong commented 2 years ago

This issue closed without a solution @guowei-gong? Can u provide your solution?

I changed the suffix of the picture of .png to the suffix of .jpg, which is effective

guowei-gong commented 2 years ago

I changed the suffix of the picture of .png to the suffix of .jpg, which is effective

I changed the suffix of the picture of .png to the suffix of .jpg, which is effective