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

Quality not affecting PNG format #84

Open
vladikdx opened this issue Dec 9, 2022 · 1 comment
Open

Quality not affecting PNG format #84

vladikdx opened this issue Dec 9, 2022 · 1 comment

Comments

@vladikdx
Copy link

vladikdx commented Dec 9, 2022

When setting the compressed format to PNG no matter what quality value you are writing it's just not changing the URI compressed file size result.
Have anyone faced that issue?

const resizeFile = (file) =>
  new Promise((resolve) => {
    Resizer.imageFileResizer(
      file,
      300,
      300,
      "PNG",
      1,
      0,
      (uri) => {
        resolve(uri);
      },
      "file"
    );
  });
@yohann84L
Copy link

That's because you cannot compress PNG as it is a lossless format. Use instead JPEG or WEBP

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