clone fails after extent

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
sparr
Posts: 4
Joined: 2015-01-24T19:04:33-07:00
Authentication code: 6789

clone fails after extent

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: clone fails after extent

Post 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:
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: clone fails after extent

Post 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
sparr
Posts: 4
Joined: 2015-01-24T19:04:33-07:00
Authentication code: 6789

Re: clone fails after extent

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: clone fails after extent

Post 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
Post Reply