MagickStudio one more error

Use this forum for comments, suggestions or problems related to the online ImageMagick Studio web interface @ https://imagemagick.org/MagickStudio.
Post Reply
Iland

MagickStudio one more error

Post by Iland » 2007-03-07T23:20:58-07:00

Affine transformation here is no longer working?
Some days ago there was all OK... Is this a problem of a new version of ImageMagick (6.3.3)?
What did I do wrong?
UPD: Now it works again. On webbyland, not on my server. Still searching solution.
I've tested it locally and found some problems on windows, maybe it's problems of my misunderstanding of concept. But on the linux server I've got a strange behavior of MagickWand&ImageMagick, trying to affine transform an image. I didn't get effect of transform function at all! And also I didn't get any exceptions or errors....

We have no more affine transformations?

User avatar
BDiana
Posts: 37
Joined: 2003-06-01T11:35:16-07:00
Location: Cosmos

Re: MagickStudio one more error

Post by BDiana » 2007-03-08T10:54:38-07:00

It would be hard to help with an error if it can't be recreated. You've asked "...what did I do wrong?", but didn't specify the steps that you did. Which interface did you use?

Iland

Re: MagickStudio one more error

Post by Iland » 2007-03-10T08:27:15-07:00

OK.. I use MagicWand for PHP. I'm trying to transform an image.

Code: Select all

<?php
$ptrn=NewMagickWand();
MagickReadImage($ptrn,'pattern.tif');
$pw=NewPixelWand();
PixelSetColor($pw,'black');
PixelSetAlpha($pw,0);
PixelSetOpacity($pw,0);

// only for test purposes - this transfomation works.
MagickShearImage($ptrn,$pw,15,0);

// only for test purposes - this transformation works on linux and hangs php on windows.
MagickRotateImage($ptrn,$pw,45);

$atdw=NewDrawingWand();
DrawAffine($atdw,floatval($_GET['sx']),floatval($_GET['sy']),floatval($_GET['rx']),floatval($_GET['ry']),floatval($_GET['tx']),floatval($_GET['ty']));
if (WandHasException($atdw)) // it also works and didn't show an error
{
    $r=DrawGetException($atdw);
    print_r($r);exit;
};

$r=MagickAffineTransformImage($ptrn,$atdw); //this does nothing and no errorcode returns...
if (!$r||WandHasException($ptrn))
{
     echo MagickGetExceptionString($ptrn);
     exit;
};

//MagickCompositeImage($ptrn,$mw,MW_OverCompositeOp,0,0); /// old code fragment, there was some image compositing, it works good
$nw=$ptrn;

if (!$nw)
{
     echo MagickGetExceptionString($nw);
     exit;
};

MagickSetImageFormat($nw,'JPG');
MagickEchoImageBlob($nw);
?>

As shown above, parameters for DrawAffine function was taken from URL string. But any values of these params has no effect - tranformation didn't work...

Post Reply