Page 1 of 1

clone fails after extent

Posted: 2015-12-01T15:38:58-07:00
by sparr
$ convert --version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2015-01-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
$ identify in.png
in.png PNG 24x24 384x3720+24+768 8-bit sRGB 114c 1.19KB 0.000u 0:00.000
$ convert in.png -clone 0 out.png
$ convert in.png -extent 32x26 -clone 0 out.png
convert: ../../magick/list.c:224: CloneImages: Assertion `images->signature == 0xabacadabUL' failed.

I can provide the png in question if necessary, however this happens with many different similarly sized/formatted pngs.

Re: clone fails after extent

Posted: 2015-12-01T15:41:28-07:00
by dlemstra
Can you reproduce this issue with the latest version of ImageMagick? I am unable to reproduce the issue with the following command:

Code: Select all

convert logo: -extent 32x26 -clone 0 null:

Re: clone fails after extent

Posted: 2015-12-01T17:38:19-07:00
by fmw42
What do you mean by "clone fails"? What are you expecting as a result -- one png or two?

Clones need to be in parenthesis. Try this (unix syntax)

Code: Select all

convert \( in.png -extent 32x26 \) \( -clone 0 \) out.png
or in windows syntax,

Code: Select all

convert ( in.png -extent 32x26 ) \( -clone 0 \) out.png
Always best to provide your platform along with the IM version, since syntax differs.

Example:

Code: Select all

convert \( rose: -extent 32x26 \) \( -clone 0 \) out.png
produces two exact copies of the rose image cropped to 32x26: out-0.png and out-1.png. You might also want to include the gravity setting for where it should be cropped or padded and if padded, then the background color.

If this is not what you are trying to achieve, then please explain further.


see
http://www.imagemagick.org/Usage/basics/#parenthesis
http://www.imagemagick.org/Usage/basics/#clone

Re: clone fails after extent

Posted: 2015-12-01T18:40:31-07:00
by sparr
dlemstra wrote:Can you reproduce this issue with the latest version of ImageMagick?
I'll have to wait for the latest version to be packaged for my distro. I'll check back in then.
fmw42 wrote:What do you mean by "clone fails"?
I mean that the program throws an assertion and bails out, producing no output file at all.

Re: clone fails after extent

Posted: 2015-12-01T18:49:04-07:00
by fmw42
Does it fail with my modified command line?

It works fine for me on IM 6.8.9.9 Q16 Mac OSX. I get two output images as described above.

Code: Select all

im6899 convert \( rose: -extent 32x26 \) \( -clone 0 \) out.png

Is it possible your input image is corrupt? Might you have two versions of IM installed on your system?

Might you have a corrupt or old version of libpng? I am using libpng @1.6.12_0