Page 1 of 1

how I could use clone in this code ?

Posted: 2018-09-11T16:49:35-07:00
by diegomage
Im trying use clone , but i dont know how I could use clone instead z1.png

please help me

this is my working code

Code: Select all

convert z1.gif \(  \( z1.gif    -morphology Hit-and-Miss '3x3:1,0,1 -,1,- -,-,-'   \) -negate -transparent white  \)     \(  \( z1.gif    -morphology Hit-and-Miss  '4x3:1,0,0,1 -,1,1,- -,-,-,-'    \) -negate -transparent white  \)  -composite   z3.gif;
this is like code that i want

Code: Select all

convert z1.gif \(  \( -clone 0--1    -morphology Hit-and-Miss '3x3:1,0,1 -,1,- -,-,-'   \) -negate -transparent white  \)     \(  \(-clone 0--1    -morphology Hit-and-Miss  '4x3:1,0,0,1 -,1,1,- -,-,-,-'    \) -negate -transparent white  \)  -composite   z3.gif;

Re: how I could use clone in this code ?

Posted: 2018-09-11T17:21:32-07:00
by fmw42
Why are you doing -clone 0--1? Is your z1.gif a multi-frame animation? If so, then you cannot just composite animations. You need to use -layers composite and null: between the two animations.

If z1.gif is a single frame, then you do not need -clone 0--1. -clone 0 would suffice or +clone. But you cannot put clones in a double nested set of parentheses. You should convert the z1.gif to MPR:img, the add +delete after it, then use MPR:img where you have the clone.

See https://www.imagemagick.org/Usage/files/#mpr and https://www.imagemagick.org/Usage/anim_mods/


Please always provide your Imagemgick version and platform as well as your images when asking questions.


See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

Re: how I could use clone in this code ?

Posted: 2018-09-11T17:49:52-07:00
by diegomage
very thankyou for your help
Version: ImageMagick 7.0.8-6 Q16 x86_64 2018-07-14 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php

ubuntu 14.04 linux

Re: how I could use clone in this code ?

Posted: 2018-09-11T18:54:49-07:00
by fmw42
If z1.gif is a single frame, then you should be able to combine these two commands:

Code: Select all

convert z1.gif -morphology Hit-and-Miss '3x3:1,0,1 -,1,- -,-,-' -negate -transparent white  hmt_right2.gif
convert z1.gif hmt_right2x.gif -composite z2.gif

into this one command:

Code: Select all

convert z1.gif \( +clone -morphology Hit-and-Miss '3x3:1,0,1 -,1,- -,-,-' -negate -transparent white \) -composite z2.gif

Re: how I could use clone in this code ?

Posted: 2018-09-12T17:22:17-07:00
by diegomage
very thankyou for your help fmw42