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

Cant change image name or convert into png image-compressor ignores options... #27

Closed
kiwo12345 opened this issue Feb 25, 2018 · 3 comments

Comments

@kiwo12345
Copy link

kiwo12345 commented Feb 25, 2018

I cant change image name or convert into png

I am using

const imageCompressor = new ImageCompressor();

imageCompressor.compress(file, {
          mimeType: 'image/jpeg',
          quality: 0.7,
          maxWidth: 1280,
          maxHeight: 900,
          checkOrientation: true,
          mimeType: 'image/jpeg',
})
  .then((result) => {
    result.name = 'specific-name.jpg';
    // ...
  });

The image I am trying is a 398 × 326 .png but always retuns as png image and name doesnt get changed either..

But it works on a .jpg image, and if I try to convert bigger .png image (1920 × 1200) it also works. Is seems really odd to me.

I have also tried convertSize: 1, in order to force convertion but with no luck..

Test image:

111111111111

@kiwo12345 kiwo12345 changed the title Cant change image name or convert into png... Cant change image name or convert into png image-compressor ignores options... Feb 25, 2018
@kiwo12345
Copy link
Author

@fengyuanchen is your commit in the master branch now? I tried to run a update but didnt seem to fetch it.

Thanks

@fengyuanchen
Copy link
Owner

It is in the develop branch, can‘t you see it?

@kiwo12345
Copy link
Author

@fengyuanchen sorry, what I should ask was when do you plan to merg it into master?

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