Did Distort() syntax change between 6.4.1 and 6.4.4?

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
Ryland

Did Distort() syntax change between 6.4.1 and 6.4.4?

Post 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?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

Change 'type=>' to 'method=>'. Your program should work as before.
Ryland

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

Post 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.
Post Reply