Use of -clone with single input image - UNIX

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
geoland
Posts: 74
Joined: 2015-05-14T05:11:38-07:00
Authentication code: 6789

Use of -clone with single input image - UNIX

Post by geoland »

Version: ImageMagick 7.0.6-0 Q16 x86_64 2017-06-26 xubuntu 16.04

Hi

Is -clone the correct operator here? Single input image two outputs

Code: Select all

convert stack.tiff \( -clone 0 -depth 16 +compress -alpha off out.png \) -depth 16 +compress -alpha off out.tiff
error
convert: unable to open image 'out.png':
Tried a number of variations +clone, -clone 0--1, clone -1 same error.
Version: ImageMagick 7.0.7 (latest compiled from source) Q32 x86_64 (as of) 2018 - 04 - 31 xubuntu
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Use of -clone with single input image - UNIX

Post by fmw42 »

You have to explicitly call +write inside parenthesis. So

Code: Select all

convert stack.tiff \( -clone 0 -depth 16 +compress -alpha off +write out.png \) -depth 16 +compress -alpha off out.tiff
geoland
Posts: 74
Joined: 2015-05-14T05:11:38-07:00
Authentication code: 6789

Re: Use of -clone with single input image - UNIX

Post by geoland »

Of course!!! Thanks
Version: ImageMagick 7.0.7 (latest compiled from source) Q32 x86_64 (as of) 2018 - 04 - 31 xubuntu
Post Reply