IM7 svn: broken -define filter: system

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

IM7 svn: broken -define filter: system

Post 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.
Last edited by NicolasRobidoux on 2012-10-15T11:05:37-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: IM7: broken -define filter: system

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

Re: IM7 svn: broken -define filter: system

Post 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?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: IM7 svn: broken -define filter: system

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply