brunobar79 / J-I-C

J I C is a Javascript Image Compressor using HTML5 Canvas & File API that allows you to compress your jpeg & png images before uploading to the server (100% client-side and no extra libraries required!)
http://makeitsolutions.com/labs/jic/
MIT License
857 stars 196 forks source link

adding optional scale parameter to compress fn #14

Open rsiwady29 opened 9 years ago

rsiwady29 commented 9 years ago

Adding an optiona scale parameter to the Compress function. Values should range from 0 to 100, clamped otherwise.

brunobar79 commented 9 years ago

Thanks for the PR! I've looked at your code and unless I'm missing something, it seems to be a very particular use case, cause it makes no sense to hardcode some % when calling the compress() since you don't know (and should not trust) the dimensions of the original image uploaded by a user.