Forum Replies Created

Viewing 1 replies (of 1 total)
  • if you cant get the image magick extension but you do have imagemagick you can try to replace it with this function:

    function get_the_article_photo($size)
    {
    	global $post;
    	$rawurl = get_post_meta($post->ID, '_articlephoto_url', true);
    	$rawfile = get_post_meta($post->ID, '_articlephoto_filename', true);
    
    	if ($rawurl == '')
    	{
    		return FALSE;
    	}
    
    	list($imageWidth, $imageHeight) = getimagesize($rawfile);
    
    	if ($size == 0 || $size >= $imageWidth)
    	{
    		return $rawurl;
    	}
    	if (file_exists($rawfile . '-' . $size))
    	{
    		return $rawurl . '-' . $size;
    	}
    	system('convert ' . $rawfile . ' -auto-orient -thumbnail ' . $size . 'x' . $size . ' -unsharp 0x.5 ' . $rawfile . '-' . $size);    
    
    	return $rawurl . '-' . $size;
    }
Viewing 1 replies (of 1 total)