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

Using JIC is increasing the size of the Image #55

Open lakshmankotipalli opened 6 years ago

lakshmankotipalli commented 6 years ago

I tried to compress a JPEG image which is of 6.x kb, and after compression, all I got is an 8KB image. Is there something I can do about this?

bkstorm commented 6 years ago

I have the same issue but with some PNG images, size of the images increases after compressing. This image is an example: link Just check toDataURL function on MDN, quality parameter doesn't work with PNG images.

lakshmankotipalli commented 6 years ago

I am able to get the JPEG images compressed to lesser size. But PNG Images are getting bigger, it seems PNG image quality cannot be reduced like for JPEG and other lossy formats. Just go through this link - https://www.lifewire.com/png-file-2622803 Jus go through the third paragraph under When to Use PNG Files @bkstorm Hope this helps.