Page 1 of 1

[RESOLVED]possible bug vignette x,y offsets in percent

Posted: 2013-11-07T15:16:33-07:00
by fmw42
It would appear that the percent offsets are not working correctly (except for size 200x200). It looks like the percent flag is ignored. See viewtopic.php?f=2&t=24414

Re: possible bug vignette x,y offsets in percent IM 6.8.7.4

Posted: 2013-11-09T11:40:46-07:00
by fmw42
Here is an example that shows that I get the same with x,y=20 and x,y=20% (note 20% of radius of 200 = 40 and not 20)

# zero offset
convert -size 400x400 xc:black -vignette 0x0+0+0 -negate vignette_0_0_0_0.jpg
Image

# default (which appears to be a proper 20% offsets = 40 pixels)
convert -size 400x400 xc:black -vignette 0x0 -negate vignette_0_0.jpg
Image

# 20 pixel offset
convert -size 400x400 xc:black -vignette 0x0+20+20 -negate vignette_0_0_20x20.jpg
Image

# 20% offset (and perhaps match the default?)
This should be a smaller circle than the above
convert -size 400x400 xc:black -vignette 0x0+20%+20% -negate vignette_0_0_20pctx20pct.jpg
Image

So it seems that the % symbol is ignored.

Re: possible bug vignette x,y offsets in percent IM 6.8.7.4

Posted: 2013-11-11T10:20:14-07:00
by fmw42
In the example above, the value of +20+20 works fine and gives the correct result of a 20 pixel offset as measured from the left side of the image.

The example with +20%+20% gives the same 20 pixel offset as measured from the left side of the image. 20% of 200 pixel radius should be 40 pixels, but I still get 20 pixels.

So it seems to me that the percent is being ignored except in the default case, which seems to be the proper 20% whether the image is 200x200 or 100x100.

Re: possible bug vignette x,y offsets in percent IM 6.8.7.4

Posted: 2013-11-11T10:52:05-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.7-6 Beta available by sometime tomorrow. Thanks.