Page 1 of 1

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

Posted: 2012-10-05T05:05:11-07:00
by NicolasRobidoux
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?).

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

Posted: 2012-10-05T05:23:01-07:00
by magick
Post a command line where +define does not behave as expected. We need to reproduce the problem before we can fix it.

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

Posted: 2012-10-05T05:55:27-07:00
by NicolasRobidoux
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?

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

Posted: 2012-10-05T06:06:33-07:00
by NicolasRobidoux
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.

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

Posted: 2012-10-05T07:41:03-07:00
by magick
We can reproduce the problem you reported and have a patch in ImageMagick 6.7.9-10 Beta available by sometime tomorrow. Thanks.

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

Posted: 2012-10-09T19:13:41-07:00
by anthony
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?