kohana / image

A Kohana module for manipulating images
http://kohanaframework.org/
103 stars 58 forks source link

Lossless image compression #22

Open ghost opened 9 years ago

ghost commented 9 years ago

Is it possible to add this future to Kohana image module?

For example: $image->press(Image::LOSSLESS)->save();

enov commented 9 years ago

The Image class has a ::save() method with a $quality parameter:

Image::save($file = NULL, $quality = 100)

However, if you are dealing with JPG files, you are dealing with mostly a lossy algorithm.

You should get lossless results when using PNG, irrespective of the $quality parameter.

ghost commented 9 years ago

Yea, ofc i saw it. But is it simillar: quality of photo and lossless image compression ? Lossless means, what we will not use quality, but we take some advantages in physical size of photo (KB).