Code: Select all
convert -size 100x100 plasma: plasma.png
convert plasma.png ^
-distort Barrel 0,0,0,1 ^
plasma_debarrel.png
The bad behaviour doesn't occur when the input is a solid colour.
IM 6.6.0-8 Q16 on Windows 7.
Code: Select all
convert -size 100x100 plasma: plasma.png
convert plasma.png ^
-distort Barrel 0,0,0,1 ^
plasma_debarrel.png
Code: Select all
else { /* Special handling to avoid divide by zero when r=0 */
s.x=s.y=0.0;
Code: Select all
else { /* Special handling to avoid divide by zero when r=0 */
s.x=coeff[8];
s.y=coeff[9];
hmmm except the line is 2234 in the latest version of IM. But yes that does appear to be the error.snibgo wrote:I guess that in distort.c around line 2222 the lines
should beCode: Select all
else { /* Special handling to avoid divide by zero when r=0 */ s.x=s.y=0.0;
(But don't take my word for it.)Code: Select all
else { /* Special handling to avoid divide by zero when r=0 */ s.x=coeff[8]; s.y=coeff[9];
Code: Select all
convert plasma.png -distort Barrel 0,0,0 show:
convert: invalid argument for option Barrel : number of arguments @ error/distort.c/GenerateCoefficients/1248
Code: Select all
... -distort Shepards '
19,8, 29,8
19,27 29,27
26,34 36,34
33,37 43,37
36,37 46,37
53,37 63,37
58,25 68,25
13,20 13,20
17,28 17,28
25,36 25,36
35,39 35,39
46,40 46,40
50,43 50,43
' ......
Code: Select all
.... -distort Shepards '@coordinates.txt' ...
Code: Select all
convert -size 600x60 xc: -sparse-color barycentric \
'0,%h black %w,0 skyblue 0,-%h skyblue' diagonal_gradient.jpg