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

Options can be improved #2

Closed
qgustavor opened this issue Jul 28, 2017 · 1 comment
Closed

Options can be improved #2

qgustavor opened this issue Jul 28, 2017 · 1 comment

Comments

@qgustavor
Copy link

There are some issues in the part of the code which handles resizing:

  • options.height is ignored when options.width is set;
  • and images smaller than options.height and/or options.height can be either upscaled or not compressed (because the comparison in line 107);

Note that, because the comparison in line 107, seems resizing is only a method to try to make a image smaller, not a requirement. I think there should be at least a note in readme about that.

In lines 94 and 96 the format of the resulting image is the same format of the original image. So the format is a choice of the end user (it can be even a BMP image). Would be better if it was an option.

Finally, is complicated to add a size limit option? Too large files can be compressed into a lossy format (like imgur, which converts PNGs larger than 5MB to JPEG).

@fengyuanchen
Copy link
Owner

Good issues and suggestion! We will improve them soon. Thanks.

fengyuanchen added a commit that referenced this issue Jul 31, 2017
fengyuanchen added a commit that referenced this issue Jul 31, 2017
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