Improved Image Scaling in 7.7.1 with 'imgsclr'

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Improved Image Scaling in 7.7.1 with 'imgsclr'

Gerrit Berkouwer
In the 7.7.1 announcement I read this:

***
Improved Image Scaling
The quality of scaled images has been improved a lot through the usage of the open source imgscalr library. The original image data is used as-is whenever possible: image quality does not degrade when no scaling is needed. The image scaling process now is automatically throttled to protect and enhance the robustness of the CMS application itself.
***

Nice. If it brings what I hope :-). Is there more info about the differences between 'imgsclr' and the old library?

The current image scaling in Hippo gives us no good results. Even when telling Hippo to not compress images at all, the resulting uploaded image was altered, in the wrong way, with bad results.

So what I hope is the following: is it possible to simply tell 'imgsclr' not to alter/compress anything? Does this result in an untouched 1:1 uploaded image in Hippo?


 

--
Greetz, Gerrit
Reply | Threaded
Open this post in threaded view
|

Re: Improved Image Scaling in 7.7.1 with 'imgsclr'

Mathijs den Burger
On Tue, Apr 10, 2012 at 12:30 PM, Gerrit Berkouwer
<[hidden email]> wrote:

> In the 7.7.1 announcement I read this:
>
> ***
> Improved Image Scaling
> The quality of scaled images has been improved a lot through the usage of
> the open source imgscalr library. The original image data is used as-is
> whenever possible: image quality does not degrade when no scaling is needed.
> The image scaling process now is automatically throttled to protect and
> enhance the robustness of the CMS application itself.
> ***
>
> Nice. If it brings what I hope :-). Is there more info about the differences
> between 'imgsclr' and the old library?

The old scaling method used a multi-step technique to downscale
images, which was one of the best practices out there. The imgscalr
library also applies this technique when applicable, but also adds all
known Java image scaling tricks to improve quality and/or speed. See
[1] for a description of all the bells and whistles in there.

> The current image scaling in Hippo gives us no good results. Even when
> telling Hippo to not compress images at all, the resulting uploaded image
> was altered, in the wrong way, with bad results.

That's why we now keep the original image data as-is, whenever possible:
- when a variant is configured to keep the original dimensions (width
= 0 and height = 0)
- when the uploaded image already has the correct target dimension
- when the uploaded image should be scaled up, and upscaling is
disabled for that variant

Using the original data as-is will not lower the quality (obviously),
and also keep EXIF data (which may also be nice to have). Only when we
need to scale, we now process the incoming data with imgscalr and save
it back.

Note that this also makes it possible to, for example, fix scaled
variants manually when the automatically created variants are not
right for some reason (not the right quality, no EXIF data anymore,
transparent images that are not handles correctly, etc.). When you now
upload a new image for an individual variant, and the new image
already has the right width and height, we just use it as-is.

best,
Mathijs
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Improved Image Scaling in 7.7.1 with 'imgsclr'

skranend
Nice! can't wait to give this a spin. Much needed improvement imho. Image gallery was almost unusable because of this.

will the crop tool also be improved in the foreseeable future? especially the ability to set 1 dimension fixed and one free is missing.
Reply | Threaded
Open this post in threaded view
|

Re: Improved Image Scaling in 7.7.1 with 'imgsclr'

Gerrit Berkouwer
In reply to this post by Mathijs den Burger
Nice. Can you add the link for [1]? Thanks:-)
--
Greetz, Gerrit
Reply | Threaded
Open this post in threaded view
|

Re: Improved Image Scaling in 7.7.1 with 'imgsclr'

Mathijs den Burger
On Thu, Apr 12, 2012 at 6:56 AM, Gerrit Berkouwer
<[hidden email]> wrote:
> Nice. Can you add the link for [1]? Thanks:-)

Ah sorry: http://www.thebuzzmedia.com/software/imgscalr-java-image-scaling-library/

-Mathijs
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html