[wp-trac] [WordPress Trac] #48842: Fix calculation error when resampling images before resizing in class-wp-image-editor-imagick.php
WordPress Trac
noreply at wordpress.org
Mon Dec 2 02:12:15 UTC 2019
#48842: Fix calculation error when resampling images before resizing in class-wp-
image-editor-imagick.php
-------------------------------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: 5.3.1
Component: Media | Version: 4.5
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion needs-testing | Focuses:
-------------------------------------------------+---------------------
Comment (by vanyukov):
@azaozz , the "to be more efficient" was for resource handling. When
debugging the issue with large sizes not being generated, I went back to a
4 or 5 years back discussion in trac and there was a reference to this
article:
https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-
imagemagick/
I can see that many image optimization settings are similar in WordPress,
so I assumed a lot was taken from that article. Here's a quote:
>This means that if we were resizing an image to be 500 pixels wide,
-thumbnail would first resize it to 2,500 pixels wide using -sample; the
result might be blocky and pixelated, as we saw in the examples above, but
the operation would be fast and would produce a result with a small file
size. Then, ImageMagick would resize this image from 2,500 pixels wide to
500 pixels wide using -resize. This smooths out the blockiness, but the
file size stays pretty low.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48842#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list