Virtual offset problems...

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

Virtual offset problems...

Post by anthony »

case 1

If I do...

Code: Select all

convert -page +10+10 rose: -identify -rotate 30 -identify show:
rose:=>ROSE PPM 70x46 0x0+10+10 8-bit sRGB 9.67KB 0.000u 0:00.000
rose:=>ROSE PPM 70x46=>86x76 0x0+10+10 8-bit sRGB 0.000u 0:00.000
The rotated image has a offset of +10+10 instead of the expected correct behaviour...

Code: Select all

convert rose: -repage +10+10 -identify -rotate 30 -identify show:
rose:=>ROSE PPM 70x46 70x46+10+10 8-bit sRGB 9.67KB 0.000u 0:00.000
rose:=>ROSE PPM 70x46=>86x76 86x76+2-5 8-bit sRGB 0.000u 0:00.000
That is -page is effecting the secondary rotated (or distorted) image when it should only effect completely NEW images.
This may only be appearing because 'distort' also changes the virtual offset of images.

This problem does NOT happen using the IMv7 "magick" command.

case 2

Also centered crop seems to be loosing the virtual offset...
For example... no offset case..

Code: Select all

convert rose: -identify -gravity center -crop 50% -identify show:
rose:=>ROSE PPM 70x46 70x46+0+0 8-bit sRGB 9.67KB 0.000u 0:00.000
rose:=>ROSE PPM 70x46=>35x23 70x46+18+12 8-bit sRGB 0.000u 0:00.000
But this should still have an extra 10 pixel offset (or perhaps a extra 5 pixels) added to the crop offset....

Code: Select all

convert rose: -repage +10+10 -identify -gravity center -crop 50% -identify show:
rose:=>ROSE PPM 70x46 70x46+10+10 8-bit sRGB 9.67KB 0.000u 0:00.000
rose:=>ROSE PPM 70x46=>35x23 70x46+18+12 8-bit sRGB 0.000u 0:00.000
As you can see the virtual offset component of the centered crop is 'lost'

Note the center of the crop is the virtual canvas, and not of actual image! That is to be expected, even if inconvenient.
This also happens with the IMv7 "magick" command.

The previous '-page' problem is also effecting this...

Code: Select all

convert -page +10+10 rose: -identify -gravity center -crop 50% -identify show:
rose:=>ROSE PPM 70x46 0x0+10+10 8-bit sRGB 9.67KB 0.000u 0:00.000
rose:=>ROSE PPM 70x46=>35x23 0x0+10+10 8-bit sRGB 0.000u 0:00.000
(not in IMv7)
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: Virtual offset problems...

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.4-9 Beta available by sometime tomorrow. Thanks.
Post Reply