问题
I'm very new to AEM and I'm trying to reduce the image size by using named transform image servlet
in AEM 6.3. After reducing the image size using resize
property, the image quality goes down terribly.
I've also tried using attributes sharpen
and quality
however I'm not able to understand their proper usage even after going through the adobe docs.
This is the original image resolution1600 x 530
This is the image configuration that I've tried so far:
bounded-resize:width=1423&height=471&upscale=true
(using this only reduces the image quality a lot)
quality:quality=82
(this changed nothing)
sharpen:op_usm=3.5,20
(this distorted the image completely, sort of oil paint effect)
Above configuration maintains the aspect ration but not the quality.
Need to know what wrong I've done in this and how do I REDUCE THE IMAGE SIZE WHILE MAINTAINING THE ASPECT RATIO AND IMAGE QUALITY.
回答1:
You should check the order of Image Transformers
in your transformer configuration. The documentation states:
Order matters when defining your image transformation rules. For example, a resize then crop can yield significantly different results than a crop then resize.
I am not a 100% sure which makes more sense: Resize and Crop
or Crop and Resize
. But that would be easy to validate:
Create two transformer configurations. Both should just contain the resize and crop setting but in a different order. Call both of them (with the right URL) and then compare the resulting images.
回答2:
how do I REDUCE THE IMAGE SIZE WHILE MAINTAINING THE ASPECT RATIO AND IMAGE QUALITY.
As a best practice, to achieve a high image quality and small file size, start with the following combination of parameters:
fmt=jpg&qlt=85,0&resMode=sharp2&op_usm=1.75,0.3,2,0
This combination of settings products excellent results under most circumstances.
For further reading and learning, Refer to this
来源:https://stackoverflow.com/questions/49891213/image-quality-downgraded-after-resizing-in-aem-6-3