if ((traits == UndefinedPixelTrait) ||
(morphology_traits == UndefinedPixelTrait))
continue;
- if (GetPixelReadMask(image,p+center) == 0)
+ if (((morphology_traits & CopyPixelTrait) != 0) ||
+ (GetPixelReadMask(image,p+center) == 0))
{
SetPixelChannel(morphology_image,channel,p[center+i],q);
continue;
if ((traits == UndefinedPixelTrait) ||
(morphology_traits == UndefinedPixelTrait))
continue;
- if (GetPixelReadMask(image,p+center) == 0)
+ if (((morphology_traits & CopyPixelTrait) != 0) ||
+ (GetPixelReadMask(image,p+center) == 0))
{
SetPixelChannel(morphology_image,channel,p[center+i],q);
continue;