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

Specifying quality changes PNG file format to ISO Media #68

Closed
kbrandwijk opened this issue Jul 1, 2022 · 4 comments · Fixed by #69
Closed

Specifying quality changes PNG file format to ISO Media #68

kbrandwijk opened this issue Jul 1, 2022 · 4 comments · Fixed by #69
Assignees
Labels
Milestone

Comments

@kbrandwijk
Copy link

Using sharp-cli@2.1.0:

❯ file logo.png
logo.png: PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced

❯ npx sharp-cli -i ./logo.png -o ./logo_opt.png
/.../logo_opt.png

❯ file logo_opt.png
logo_opt.png: PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced

❯ file logo_opt.png
logo_opt.png: PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced

❯ npx sharp-cli -i ./logo.png -o ./logo_opt80.png --quality 80
/.../logo_opt80.png

❯ file logo_opt80.png
logo_opt80.png: ISO Media
@kbrandwijk
Copy link
Author

Additionally, I tried specifying --format input explicitly, which didn't help. Specifying --format png did, but that's not a solution for us (expo-optimize) because we encounter different input formats.

@vseventer
Copy link
Owner

Thanks for reporting - this looks like a bug where I forgot to add force: false to HEIF meaning this is actually quite a big problem.

@vseventer vseventer added the bug label Jul 1, 2022
@vseventer vseventer added this to the v2.1.1 milestone Jul 1, 2022
@vseventer vseventer self-assigned this Jul 1, 2022
vseventer added a commit that referenced this issue Jul 1, 2022
vseventer added a commit that referenced this issue Jul 1, 2022
@vseventer
Copy link
Owner

@kbrandwijk This has now been released as v2.1.1.

@kbrandwijk
Copy link
Author

Awesome, I can confirm that fixes it!

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

Successfully merging a pull request may close this issue.

2 participants