WordPress.org

Ready to get started?Download WordPress

Forums

ImageMagick cropping fail on Hostpapa /Wordpress 3.5 (3 posts)

  1. bluecomet
    Member
    Posted 1 year ago #

    Media uploads are failing at the point where ImageMagick is trying to crop the image.

    In wp-includes/class-wp-image-editor-imagick

    in function crop, this line
    $this->image->cropImage( $src_w, $src_h, $src_x, $src_y );

    Causes an Http 500 Internal Server Error.

    This happens with HostPapa, not with another host I am using. New Install of WordPress 3.5

    At a loss. Hostpapa support does not deal with WordPress issues as it is "Third Party Software".

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    If this happens on one server but not another, then it implies that it's a server configuration issue. In fact I'd strongly recommend switching hosts. HostPapa do not have a good record around here.

  3. bluecomet
    Member
    Posted 1 year ago #

    I dug into WordPress code some more and reproduced what it was doing on my own test file outside of WordPress as follows:

    < ? php

    /* This line below will cause cropImage to fail */
    Imagick::queryFormats( 'JPG');

    $img = new Imagick('leonids.jpg');
    $img->writeImage('testresult16.jpg');
    $img->cropImage(150,150,0,0);
    $img->writeImage('testresult16-crop.jpg');

    ? >

    WordPress does a queryFormats call which causes cropImage to fail. Either with just a blank screen, or internal server error or a memory error if the file is large. Leaving it out will work, even on large images. ImageMagick 6.4.8 2011-02-03 Q16

    Waiting to hear back from Hostpapa.

Topic Closed

This topic has been closed to new replies.

About this Topic