official link: http://php.net/manual/zh/imag.
when using Imagick::mergeImageLayers to merge PSD layers, there is confusion in filling in the first parameter int $layer_method
.
although most of them can achieve the effect of merging layers, I still want to know how to fill in different constant values in different ways and details. The official seems to have only listed the list of constant values. I looked for it on the Internet and did not find the relevant detailed instructions. Do you have any related articles or other relevant introductions?
LAYERMETHOD constants
imagick::LAYERMETHOD_UNDEFINED (integer)
ImagickImageMagick 6.2.9 or higher.
imagick::LAYERMETHOD_COALESCE (integer)
ImagickImageMagick 6.2.9 or higher.
imagick::LAYERMETHOD_COMPAREANY (integer)
ImagickImageMagick 6.2.9 or higher.
imagick::LAYERMETHOD_COMPARECLEAR (integer)
ImagickImageMagick 6.2.9 or higher.
imagick::LAYERMETHOD_COMPAREOVERLAY (integer)
ImagickImageMagick 6.2.9 or higher.
imagick::LAYERMETHOD_DISPOSE (integer)
ImagickImageMagick 6.2.9 or higher.
imagick::LAYERMETHOD_OPTIMIZE (integer)
ImagickImageMagick 6.2.9 or higher.
imagick::LAYERMETHOD_OPTIMIZEPLUS (integer)
ImagickImageMagick 6.2.9 or higher.
imagick::LAYERMETHOD_OPTIMIZEIMAGE (integer)
ImagickImageMagick 6.3.0 or higher.
imagick::LAYERMETHOD_OPTIMIZETRANS (integer)
ImagickImageMagick 6.3.0 or higher.
imagick::LAYERMETHOD_REMOVEDUPS (integer)
ImagickImageMagick 6.3.0 or higher.
imagick::LAYERMETHOD_REMOVEZERO (integer)
ImagickImageMagick 6.3.0 or higher.
imagick::LAYERMETHOD_COMPOSITE (integer)
ImagickImageMagick 6.3.0 or higher.
imagick::LAYERMETHOD_MERGE (integer)
ImagickImageMagick 6.3.7 or higher.
imagick::LAYERMETHOD_FLATTEN (integer)
ImagickImageMagick 6.3.7 or higher.
imagick::LAYERMETHOD_MOSAIC (integer)
ImagickImageMagick 6.3.7 or higher.