Page 1 of 1

use a "string" value to set parameters for MagickTransformIm

Posted: 2007-02-11T13:20:14-07:00
by eholz1
Hello I stumped!!!
I am trying to use the following type of code to transform an image.
$size = $width.'x'. $height;

$resizedImage = MagickTransformImage( $magick_wand, '0x0', "$size");

this does not work for me - it works fine if I use:

$resizedImage = MagickTransformImage( $magick_wand, '0x0', '600x500'); etc.

I have tried different ways to get the string value in the command, but no luck. (adding "dinks", etc)
Do you have any idea on how i can pass parameters to the various Magickwand functions???

Also what would be some generic setting for MagickSharpenImage($resizedImage, 0.0,1.0);
I would just like to do a "generic" sharpen to the image before I write it.

thanks for your help,
eholz1

Re: use a "string" value to set parameters for MagickTransformIm

Posted: 2007-02-11T17:55:55-07:00
by magick
This works for us:
  • $size = $width . 'x' . $height;
    $resize_image = MagickTransformImage($image, '0x0', $size);

Re: use a "string" value to set parameters for MagickTransformIm

Posted: 2007-02-12T16:46:18-07:00
by eholz1
I did discover one thing after I made this post - if the image size is the same i.e. before "size" = after "size",
the image transform will not transform! so - what I did, was shrink my height and width by a few pixels (like 100),
and then I would get a $resouce_image from the wand, etc.

Thanks,

eholz1