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

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
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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
Last edited by fmw42 on 2013-11-28T11:46:26-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
Post Reply