Append not working correctly for small images

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
greg_priestley
Posts: 2
Joined: 2014-11-29T22:26:21-07:00
Authentication code: 6789

Append not working correctly for small images

Post by greg_priestley »

Hi

Append doesn't appear to be working correctly for small images (1x1, 2x2 probably others).

As an example, try the following to generate 1x1 pixel images in red, green, blue:
convert -size 1x1 canvas:red red.jpg
convert -size 1x1 canvas:green green.jpg
convert -size 1x1 canvas:blue blue.jpg

Now try appending them together:
convert +append red.jpg green.jpg blue.jpg green.jpg result.jpg

Certainly not the expected result. If you redo and try 2x2 you'll get a different result.

This is occurring on:

Mac OS X 10.9.5
Version: ImageMagick 6.8.9-8 Q16 x86_64 2014-10-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr png ps tiff webp x xml zlib

Any ideas?

Thanks
Greg
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Append not working correctly for small images

Post by snibgo »

Append works fine, as far as I know.

1. Your syntax is wrong. The "+append" should come after the input files, not before them. (It happens to work here, but it is better to get it right.)

2. JPG is lossy compression. It changes colours. For better quality, put "-quality 100" before the output file. Better, use PNG instead of JPG.
snibgo's IM pages: im.snibgo.com
greg_priestley
Posts: 2
Joined: 2014-11-29T22:26:21-07:00
Authentication code: 6789

Re: Append not working correctly for small images

Post by greg_priestley »

Thanks - JPG lossy compression the culprit. Using PNG and finally got it sorted.
Post Reply