Random pixel drop outs on image pipeline
Posted: 2016-08-20T01:12:34-07:00
Hello!
I've been encountering a very persistent issue with the ImageMagick 6.9.* series (I have attempted to resolve this by trying every version in this series).
This is using RMagick, but I am able to duplicate the issue consistently by reproducing the processing pipeline using the command line.
The Issue:
Given an original image TIFF: https://s3.amazonaws.com/weaveup-apertu ... ginal.tiff
and then performing the following operations (via the API, command line equivalents provided):
I get output like:
instead of the expected:
This occurs with many source images:
At first I suspected a memory corruption issue, so I nuked the server that is responsible for processing these images and spun up a new one in a different data center. This issue continued to reveal itself, so I tried a couple more times, and with every version of ImageMagick in the 6.9.x series.
I also have validated that this occurs even if there is plenty (30gb +) of free RAM available on the box.
I cannot downgrade to the ImageMagick (6.5 series) supported by Ubuntu, as that causes a separate but just as awful issue with the same image processing pipeline:
I've been encountering a very persistent issue with the ImageMagick 6.9.* series (I have attempted to resolve this by trying every version in this series).
This is using RMagick, but I am able to duplicate the issue consistently by reproducing the processing pipeline using the command line.
Code: Select all
Version: ImageMagick 6.9.4-10 Q16 x86_64 2016-08-19 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC OpenMP
Delegates (built-in): bzlib cairo djvu fontconfig freetype gvc jbig jng jpeg lcms lqr lzma openexr png rsvg tiff wmf x xml zlib
Given an original image TIFF: https://s3.amazonaws.com/weaveup-apertu ... ginal.tiff
and then performing the following operations (via the API, command line equivalents provided):
Code: Select all
convert https://s3.amazonaws.com/weaveup-aperture-dev/imagemagick_issues/8d0a4826_original.tiff -alpha remove removed_alpha.tiff
convert removed_alpha.tiff -colorspace Lab to_lab.tiff
convert to_lab.tiff -sample 2048x2048\> tile_primitive.tiff
#page sizes and tile dimensions are calculated dynamically, this is for this specific image example
convert -page +0+0 tile_primitive.tiff -page +0+2048 tile_primitive.tiff -page +2048+0 tile_primitive.tiff -page +2048+2048 tile_primitive.tiff -page +0+4096 tile_primitive.tiff -page +2048+4096 tile_primitive.tiff -mosaic tiled.tiff
convert tiled.tiff -resize 320x320^ aspect_ratio_resized.tiff
convert aspect_ratio_resized.tiff -gravity Center -crop 320x320+0+0 cropped.tiff
convert cropped.tiff output.png
instead of the expected:
This occurs with many source images:
At first I suspected a memory corruption issue, so I nuked the server that is responsible for processing these images and spun up a new one in a different data center. This issue continued to reveal itself, so I tried a couple more times, and with every version of ImageMagick in the 6.9.x series.
I also have validated that this occurs even if there is plenty (30gb +) of free RAM available on the box.
I cannot downgrade to the ImageMagick (6.5 series) supported by Ubuntu, as that causes a separate but just as awful issue with the same image processing pipeline: