Page 1 of 1

IM7 svn: broken -define filter: system

Posted: 2012-10-15T07:37:12-07:00
by NicolasRobidoux
I think it happened in the last week (before yesterday, I'm pretty sure). And it still happens with this morning's svn (version 9629).
For example,

Code: Select all

convert (or magick) input.png -define filter:verbose=1 -distort Resize 700% output.png
does not show any verbose output.
Actually, it looks like -defining anything having to do with filters does not have an impact. For example,

Code: Select all

convert input.png -define filter:filter=Triangle -distort Resize 700% output.png
gives the exact same output as if I skip the -define.
-----
Hopefully I did not break things myself with a funky install, but I figured I'd put it out there.

Re: IM7: broken -define filter: system

Posted: 2012-10-15T09:44:37-07:00
by magick
Anthony this is a side effect of your latest changes, if we restore the option setting code in image.c/SyncImageSettings(), the define option works, however, with your new code:
  • image->image_info = CloneImageInfo(image_info);
define settings are failing, i.e. resize.c/AcquireResizeFilter()/GetImageArtifact(image,"filter:filter") returns NULL. Note, without the CloneImageInfo() call, we get memory problems. Your original code generated a compile warning and fault:
  • image->image_info =image_info;

Re: IM7 svn: broken -define filter: system

Posted: 2012-10-15T22:51:42-07:00
by anthony
Okay. The -define needs to be applied to each image. While 'set' sometimes needs to do this, other times it does not.

This is part of the seperation of a 'global' setting and per-image 'defines' (whcih can override a globle for a specific image).

One of the other changes I need to make is when a globel 'setting' is set, per-image defines of the same name are unset.

Actually this should work...
magick xc: -set filter:verbose 1 -distort Resize 200% null:

When the 'artifact lookup' fails. it is supposed to try looking up from the global settings (options in image_info). Obviously that is not happening, perhaps because the image->image_info setting is not getting set?

Re: IM7 svn: broken -define filter: system

Posted: 2013-04-30T23:08:28-07:00
by anthony
UPDATE: This should all be resolved. I discovered the fault in the last round of updates.

PS; that last example should have been

Code: Select all

  magick xc: -set option:filter:verbose 1 -distort Resize 200% null:
:)


Another aspect is that if you undefine a option, you also need to undefine all per-image artifacts. This has also been fixed in IMv7.