[wp-trac] [WordPress Trac] #40087: Add ability to filter Imagemagick processing options
WordPress Trac
noreply at wordpress.org
Thu Mar 9 19:17:01 UTC 2017
#40087: Add ability to filter Imagemagick processing options
-----------------------------+-----------------------------
Reporter: aesqe | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.7.3
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Hi everyone :)
TLDR: I want to be able to control Imagemagick's sampling factor value for
JPEG images.
I haven't been able to find any info on whether it's possible to change
this value in Imagemagick's defaults, and there don't seem to be any
usable filters or actions in WP_Image_Editor_Imagick class.
To be able to set the sampling factor, one needs access to the Imagemagick
instance, which is a protected var in the editor class, I guess for a
reason.
Options:
a) a new public WP_Image_Editor_Imagick method which would be able to call
Imagemagick instance methods, made available via an ''add_action'' call
b) add something like the following code to the ''set_quality'' method:
{{{
if( defined("IMAGICK_SAMPLING_FACTOR") ) {
$this->image->setImageProperty('jpeg:sampling-factor',
IMAGICK_SAMPLING_FACTOR);
}
}}}
Any ideas?
Thanks!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40087>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list