I'm seeing a bug when calling `MagickAdaptiveBlurImageChannel(magickwand, 5, 1, BlueChannel);`
Source image
Output Image
Running the code through valgrind reports lots of reads from uninitialised memory. Running an equivalent command through convert shows similar errors in valgrind. The image generated through the command line varies, and does not appear to be always correct but is not as dramatically wrong.
Code: Select all
convert magick:logo test.png
valgrind convert test.png -channel B -adaptive-blur 5x1 output.png
==25458== Memcheck, a memory error detector
==25458== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==25458== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==25458== Command: convert test.png -channel B -adaptive-blur 5 1 output.png
==25458==
==25458== Conditional jump or move depends on uninitialised value(s)
==25458== at 0x4F8A0D8: MorphologyApply (morphology.c:3330)
==25458== by 0x4F2959F: EdgeImage (effect.c:1305)
==25458== by 0x4F2B516: AdaptiveBlurImageChannel (effect.c:212)
==25458== by 0x557C17D: MogrifyImage (mogrify.c:739)
==25458== by 0x55824CA: MogrifyImages (mogrify.c:8753)
==25458== by 0x55053BF: ConvertImageCommand (convert.c:613)
==25458== by 0x55A75DF: MagickCommandGenesis (mogrify.c:168)
==25458== by 0x400984: main (in /usr/bin/convert)