Page 1 of 1

Did Distort() syntax change between 6.4.1 and 6.4.4?

Posted: 2008-11-28T11:16:05-07:00
by Ryland
My Perl scripts were working before under 6.4.1, but my web host moved my site to a new server and updated IM to 6.4.4 and now the script is throwing the following error:

Code: Select all

perl: magick/distort.c:408: GenerateCoefficients: Assertion `! "Unknown Method Given"' failed.
Here's the code I use:

Code: Select all

$content->Distort('virtual-pixel'=>"transparent", type=>"Perspective", points=>[88,50,85,52, 88,215,88,216, 305,50,304,49, 305,215,307,214]);
This code worked perfectly before, but it causes a core dump after the update to 6.4.4.

What changed about Distort() between those versions?

Re: Did Distort() syntax change between 6.4.1 and 6.4.4?

Posted: 2009-03-16T21:03:49-07:00
by anthony
I believe I may have been the cause. I added sparse-color operator whcih required some code sharing between distort and sparse-color (very simple code, but one generating 3/4/5 dimensional color gradients instead of 2 dimentional lookup coordinates.

this naturally broke some other API's I have no control of, but it should be fixed by now.

I am expecting another breakage at some point in the future as I expand the capability form just a list of numbers / coordinates to triangular meshes, to allow users to apply advanced distortions, morphing and texture mapping

Re: Did Distort() syntax change between 6.4.1 and 6.4.4?

Posted: 2009-03-17T05:47:29-07:00
by magick
Change 'type=>' to 'method=>'. Your program should work as before.

Re: Did Distort() syntax change between 6.4.1 and 6.4.4?

Posted: 2009-03-17T07:00:08-07:00
by Ryland
Yeah, I found that out, Google turned up a few people that had the same problem and one of them posted the solution. I guess I should have updated this thread, but I was kind of pissed about it at the time and didn't think about it. Thanks, though.