Page 1 of 1

Append not working correctly for small images

Posted: 2014-11-29T22:39:14-07:00
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

Re: Append not working correctly for small images

Posted: 2014-11-29T23:00:18-07:00
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.

Re: Append not working correctly for small images

Posted: 2014-11-30T14:45:59-07:00
by greg_priestley
Thanks - JPG lossy compression the culprit. Using PNG and finally got it sorted.