Page 1 of 1

composite bug; random lines in image

Posted: 2015-10-30T00:45:22-07:00
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

Re: composite bug; random lines in image

Posted: 2015-10-30T01:25:32-07:00
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.