composite bug; random lines in image

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
jmac698
Posts: 48
Joined: 2013-12-20T01:57:16-07:00
Authentication code: 6789

composite bug; random lines in image

Post by jmac698 »

I found a bug!

Code: Select all

convert -size 400x400 canvas:white ( +clone -evaluate set 32768 ) ( +clone -evaluate set 16384 ) -delete 0 -append stacked.png
convert stacked.png -crop100%x50% -depth 16 ( -clone 0 -evaluate multiply 2 ) ( -clone 1 -evaluate multiply 256 ) -delete 0-1  -compose Add -composite -define png:bit-depth=16 test1.png
http://imgur.com/K9AifJL

The image consists of a white left half, followed by a right black half, with a few random white/black vertical lines in each. Such a pattern should be impossible when it's supposed to be a solid colour.

Code: Select all

convert -version
Version: ImageMagick 6.9.2-4 Q16 x64 2015-10-10 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180031101
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangoca
iro png ps rsvg tiff webp xml zlib
Last edited by jmac698 on 2015-10-30T00:48:31-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: composite bug; random lines in image

Post by snibgo »

You need a space after "crop", but I guess that's just a copy-paste typo.

Please reduce the problem to the simplest example that shows the bug.

Note that Q16 can store integers between 0 and 65535, inclusive. 32678*2 is a bit bigger, and 16384*256 is much bigger.
snibgo's IM pages: im.snibgo.com
Post Reply