The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
PixelSetRed, PixelSetGreen and PixelSetBlue do not set a pixel in an image. They only change the PixelWand itself.
You need to use pixel iterators to access and modify the pixelwands and then use PixelSyncIterator to write them back into the image.
See my example here which uses iterators: http://members.shaw.ca/el.supremo/Magic ... dulate.htm
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
and I suspect that you only need to sync iterator2 because pixels1[] hasn't been modified.
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
for( int k=0; k < width; k++)
{
/*AVERAGE*/
PixelSetRed(pixels2[k],(PixelGetRed(pixels1[k]) + PixelGetRed(pixels2[k]))/2);
PixelSetGreen(pixels2[k],(PixelGetGreen(pixels1[k]) + PixelGetGreen(pixels2[k]))/2);
PixelSetBlue(pixels2[k],(PixelGetBlue(pixels1[k]) + PixelGetBlue(pixels2[k]))/2);
}
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.