Possible bug/limitation of fx string formats
Posted: 2017-09-12T18:25:14-07:00
IM 7.0.7.1 Q16 HDRI Mac OSX Sierra.
If I do the following I think I get correct results.
min: 291.016 (0.00444061)
max: 1.47581e+07 (225.194)
mean: 268324 (4.09437)
However, -precision does not affect the min, max, mean verbose information.
More importantly, fx string formats do not seem to give the same answers. Perhaps there is clamping?
min=0
max=0
mean=4.09436179140917
But non-fx string format seem correct.
min=291.015655517578
max=14758093
mean=268324.489530727
If I do the following I think I get correct results.
Code: Select all
magick -size 64x64 gradient: -blur 1x1 -define quantum:format=floating-point -depth 64 gradient_u.tif
magick -size 64x64 gradient: -rotate 90 -blur 1x1 -define quantum:format=floating-point -depth 64 gradient_v.tif
magick gradient_u.tif gradient_v.tif -fx 'u/v' -define quantum:format=floating-point -depth 64 divide.tif
magick identify -verbose -precision 15 divide.tif
max: 1.47581e+07 (225.194)
mean: 268324 (4.09437)
However, -precision does not affect the min, max, mean verbose information.
More importantly, fx string formats do not seem to give the same answers. Perhaps there is clamping?
Code: Select all
magick -size 64x64 gradient: -blur 1x1 -define quantum:format=floating-point -depth 64 gradient_u.tif
magick -size 64x64 gradient: -rotate 90 -blur 1x1 -define quantum:format=floating-point -depth 64 gradient_v.tif
magick gradient_u.tif gradient_v.tif -fx 'u/v' -precision 15 -format "min=%[fx:min]\n max=%[fx:max]\n mean=%[fx:mean] \n" info:
max=0
mean=4.09436179140917
But non-fx string format seem correct.
Code: Select all
magick -size 64x64 gradient: -blur 1x1 -define quantum:format=floating-point -depth 64 gradient_u.tif
magick -size 64x64 gradient: -rotate 90 -blur 1x1 -define quantum:format=floating-point -depth 64 gradient_v.tif
magick gradient_u.tif gradient_v.tif -fx 'u/v' -precision 15 -format "min=%[min]\n max=%[max]\n mean=%[mean]\n" info:
max=14758093
mean=268324.489530727