Imagemagick does not see any bounding box. The alpha channel has a center black region and then at the top and bottom is white. That is why you get the white areas.
Your can see that by looking at the alpha channel and the underlying image:
Code: Select all
magick solarSystem.1116.exr -alpha extract alpha.png
magick solarSystem.1116.exr -alpha remove aoff.png
So you can either trim the white off in the output:
Code: Select all
magick solarSystem.1116.exr -background black -flatten \
-bordercolor white -border 1 -trim +repage -shave 1x1 \
solarSystem.1116.a.jpg
Or you can trim the white off in the alpha channel, then fill it out with black:
Code: Select all
magick solarSystem.1116.exr \
\( -clone 0 -alpha extract -bordercolor white -border 1 \
-trim -background black -flatten -shave 1x1 \) \
-alpha off -compose copy_opacity -composite \
-background none -compose over -flatten \
solarSystem.1116.b.jpg
Or similarly, just trim the white off in the output and fill that back with black.