Support » Plugin: PDF Image Generator » ImagickException: Unable to set image alpha channel

  • mrdl

    (@mardellme)


    PHP is throwing the following error on PDF upload

    ImagickException: Unable to set image alpha channel in /wp-content/plugins/pdf-image-generator/pdf-image-generator.php:384

    The solution is to check for an alpha channel before trying to remove it

    Change line 380 of pdf-image-generator.php from:

    if ( method_exists( 'Imagick','setImageAlphaChannel' ) ) {

    to

    if ( method_exists( 'Imagick','setImageAlphaChannel' ) && $imagick->getImageAlphaChannel() ) {

    Hope this helps!

    • This topic was modified 12 months ago by  mrdl.
  • The topic ‘ImagickException: Unable to set image alpha channel’ is closed to new replies.