[RESOLVED]vignette offsets x and y
Posted: 2013-11-07T13:50:01-07:00
I was experimenting with -vignette to see what the x and y offsets do, so that I could modify the documentation.
They would appear to change the radius of the base ellipse for the vignette before applying the blur. From the code of vignetteImage, at about line 5492:
But I cannot find the default values for x and y. They are not zero as demonstrated by the following. And they do not appear to be either a fixed amount in either pixels or percent. For the size 200x200, either 20 pixel or 20%x100 radius = 20 pixels and both match the default. But at 400x400 neither 20 pixels nor 20% seem to match. Perhaps the percent is not working correctly, since both 20 pixels and 20% give the same result (but do not match the default except at 200x200)
convert -size 200x200 xc:black -vignette 0x0 -negate circle_defaultoffsets.jpg
convert -size 200x200 xc:black -vignette 0x0+0+0 -negate circle_zerooffsets.jpg
Can someone tell me what the default x and y values are? I know they must be positive so that the circle is made smaller
They would appear to change the radius of the base ellipse for the vignette before applying the blur. From the code of vignetteImage, at about line 5492:
Code: Select all
(void) FormatLocaleString(ellipse,MaxTextExtent,
"ellipse %g,%g,%g,%g,0.0,360.0",image->columns/2.0,
image->rows/2.0,image->columns/2.0-x,image->rows/2.0-y);
convert -size 200x200 xc:black -vignette 0x0 -negate circle_defaultoffsets.jpg
convert -size 200x200 xc:black -vignette 0x0+0+0 -negate circle_zerooffsets.jpg
Can someone tell me what the default x and y values are? I know they must be positive so that the circle is made smaller