page in parenthesis goes global!

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

page in parenthesis goes global!

Post by anthony »

-page goes global with parenthesis...

This works properly, positing the rose on the logo:

Code: Select all

convert granite:  -page +20+50 rose:  -flatten show:
But this pages BOTH the rose: and the logo: images, when 'page' should only be applied to the rose:
Even more so as parenthesis was used!

Code: Select all

convert granite: \( -page +20+50 rose: \) -flatten show:
Something is definitely not right!
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: page in parenthesis goes global!

Post by magick »

We can reproduce the problem and have a fix in the Subversion trunk. Since the -page behavior has changed you should check it against your web site to see if any of your existing commands depended upon the previous behavior.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: page in parenthesis goes global!

Post by anthony »

magick wrote:We can reproduce the problem and have a fix in the Subversion trunk. Since the -page behavior has changed you should check it against your web site to see if any of your existing commands depended upon the previous behavior.
Now setting -page for an input images fails.

Code: Select all

convert granite: -page +5+10  balloon.gif   -page +35+30 medical.gif  -flatten  show:
However strangely it works fine for overlaying built-ins

Code: Select all

convert granite: -page +5+10  rose:  -page +35+30 rose:  -flatten  show:
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: page in parenthesis goes global!

Post by magick »

Try this (with the latest subversion):
  • convert -respect-parenthesis granite: \( -page +20+50 rose: \) -flatten show:
It seems that -respect-parenthesis should be the default setting meaning anything within the parenthesis by default should be local to forgotten once the parens end.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: page in parenthesis goes global!

Post by anthony »

-page however should only be used to assign new images (read or specifically created)
The parenthesis should not matter in this case!

In any case -respect-parenthesis is about what settings are in place AFTER the parenthesis has finished, not before. As such again it should not matter what -page setting being done within parenthesis!
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: page in parenthesis goes global!

Post by magick »

Grab the latest from SVN. It appears to fix the problem.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: page in parenthesis goes global!

Post by anthony »

Yes it is now working correctly. passing all IM examples, including the previous examples it was originally failing with.
Post Reply