[SOLVED] +define not available to "undo" -define

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

[SOLVED] +define not available to "undo" -define

Post by NicolasRobidoux » 2012-10-05T05:05:11-07:00

Anthony tried to fix one of my scripts by undefining previous defines so that they don't affect later "independent but similar" convert commands in the stack, and in the process found out that +define is not doing it's job (anymore?).
Last edited by NicolasRobidoux on 2012-10-05T08:37:44-07:00, edited 1 time in total.

User avatar
magick
Site Admin
Posts: 11066
Joined: 2003-05-31T11:32:55-07:00

Re: +define not available to "undo" -define

Post by magick » 2012-10-05T05:23:01-07:00

Post a command line where +define does not behave as expected. We need to reproduce the problem before we can fix it.

NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: +define not available to "undo" -define

Post by NicolasRobidoux » 2012-10-05T05:55:27-07:00

anthony wrote: Hmmm... look like +define is broken!

This should be reported as a bug.


convert -size 10x6 xc:grey20 +antialias -draw 'fill white line 4,0 5,5' \
-colorspace RGB +sigmoidal-contrast 7 \
-define filter:window=Jinc -define filter:lobes=3 \
-resize 100x \
+define filter:window +define filter:lobes \
-sigmoidal-contrast 7 -colorspace sRGB -verbose info:
convert: no such option `filter:window' @ error/convert.c/ConvertImageCommand/1151.

After removing (code commenting) the check that was causing this fault.
output still shows the define in place...

....
Artifacts:
colorspace: sRGB
filename: xc:grey20
filter:lobes: 3
filter:window: Jinc
MVG: fill white line 4,0 5,5
verbose: true
....

PS: I see the double-d error on the bottom line
Warning: given that so far Anthony is the only person to see the "messed up caption error" besides me (viewtopic.php?f=1&t=21992), I have to wonder whether the above is going to show up on every recent IM. Could these things be related?

NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: +define not available to "undo" -define

Post by NicolasRobidoux » 2012-10-05T06:06:33-07:00

The reason I naively think they could be related is that the caption issue may have to do with piece of an option (label or caption) being passed to a later convert command.
I'll try to be more specific: With two different issues, one of them that affects only two people so far, it's not trivial to put together a "clean and minimal" bug-revealing piece of code.

User avatar
magick
Site Admin
Posts: 11066
Joined: 2003-05-31T11:32:55-07:00

Re: +define not available to "undo" -define

Post by magick » 2012-10-05T07:41:03-07:00

We can reproduce the problem you reported and have a patch in ImageMagick 6.7.9-10 Beta available by sometime tomorrow. Thanks.

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: +define not available to "undo" -define

Post by anthony » 2012-10-09T19:13:41-07:00

NicolasRobidoux wrote:Warning: given that so far Anthony is the only person to see the "messed up caption error" besides me (viewtopic.php?f=1&t=21992), I have to wonder whether the above is going to show up on every recent IM. Could these things be related?
This error suddenly disappeared when I started to reorganise things, and the output filename was shortened!

Niocolas, try shorting your example filename sand see if it also fixes it for you. What about making it longer?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

Post Reply