I stumbled across what may be a buggy FX calculation, or may just be a misunderstanding on my part. When I run the following command, I get the two output images below...
Code: Select all
magick -size 80x40 xc:red -duplicate 1 -extent %[fx:u[0].w*2]x%[h] out1-%d.png
out1-0.png
out1-1.png
I would expect the images to be the same dimensions, but obviously they're not. I'd think the FX expression "%[fx:u[0].w*2]" should simply double the width of the first image in the stack "u[0].w", and "-extent" should use that value for the width of the viewport on both images. Oddly, the second output image has actually doubled again. It went from the 160 pixels I'd expect to 320 pixels wide.
This effect doesn't occur when I use the second image in the stack "u[1].w" to calculate the width. The following command correctly outputs two images of the same size, 160 pixels wide like the first image above...
Code: Select all
magick -size 80x40 xc:red -duplicate 1 -extent %[fx:u[1].w*2]x%[h] out2-%d.png