NOTE you are using -extent when you have no image in memory! That does not make sense and will produce an error in IMv7
Instead of -extent why not replace -flatten with -layers merge.
and use +distort instead to generate layer images. This will preserve all virtual offsets in the final image.
Combining multiple images using -distort
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Combining multiple images using -distort
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/