• Resolved mogli235

    (@mogli235)


    Hi,

    I would like to play a little bit with settings while resizing. My colleagues are complaining over bad picture quality after resizing. I found this page (https://www.imagemagick.org/Usage/resize/#distort_resize) and wanted to test some of these settings.

    Unfortunately I got a little bit lost in your code. For example the $filter_name is set, but not used in the protected function thumbnail_image( $dst_w, $dst_h, $filter_name = ‘FILTER_TRIANGLE’, $strip_meta = true ), isn’t it?

    Actually I would like to try the suggestion to switch to RGB, resize and switch back to sRGB:
    “convert earth_lights_4800.tif -colorspace RGB -resize 500 \
    -colorspace sRGB earth_lights_colorspace.png”

    How would I do that with your plugin?
    Would it be an improvement in your opinion?

    br, Martin

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • ddur

    (@ddur)

    In “thumbnail_image” function prototype, $filter is set to default value (FILTER_TRIANGLE), which is AFAIK, never set by calling functions.

    So, if no caller is ever setting other values, default value is always used.

    To have other value as default, in function “thumbnail_image”, change $filter_name = ‘FILTER_TRIANGLE’ to whatever value you want.
    That is in deriving class file
    …./plugins/warp-imagick/classes/class-warp-image-editor-imagick.php

    You will find by WP accepted filter values in original class
    …./wp-includes/class-wp-image-editor-imagick.php
    function thumbnail_image

    However, I would only increase jpeg image quality, in plugin settings.

    In the code, you may try/experiment with increased image quality settings only when thumbnail image has smaller geometry/size. Then you may get better quality, but larger file. At your personal taste.

    ddur

    (@ddur)

    Actually your images are quite small.

    If you are looking for the speed improvement, there are other opportunities to speed your site up.

    https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.bahn-zum-berg.at%2Fwien%2Fwinter%2Fooe-voralpen-winter%2Frotmaeuer-falkenstein-im-unteren-ennstal%2F

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Resizing quality’ is closed to new replies.