status=MagickTrue;
for (id=0; id < (ssize_t) number_threads; id++)
current_depth[id]=1;
- if ((image->storage_class == PseudoClass) && (image->matte == MagickFalse))
+ if ((image->storage_class == PseudoClass) && (image->alpha_trait != BlendPixelTrait))
{
register ssize_t
i;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(static) shared(status) \
+ #pragma omp parallel for schedule(static,4) shared(status) \
if ((image->colors) > 256) \
num_threads(GetMagickResourceLimit(ThreadResource))
#endif
PixelTrait
traits;
- channel=GetPixelChannelMapChannel(image,i);
- traits=GetPixelChannelMapTraits(image,channel);
+ channel=GetPixelChannelChannel(image,i);
+ traits=GetPixelChannelTraits(image,channel);
if ((traits == UndefinedPixelTrait) ||
(channel == IndexPixelChannel) || (channel == MaskPixelChannel))
continue;
PixelTrait
traits;
- channel=GetPixelChannelMapChannel(image,i);
- traits=GetPixelChannelMapTraits(image,channel);
+ channel=GetPixelChannelChannel(image,i);
+ traits=GetPixelChannelTraits(image,channel);
if ((traits == UndefinedPixelTrait) || (channel == IndexPixelChannel) ||
(channel == MaskPixelChannel))
continue;
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if (image->colorspace == CMYKColorspace)
{
- if (image->matte == MagickFalse)
+ if (image->alpha_trait != BlendPixelTrait)
return(ColorSeparationType);
return(ColorSeparationMatteType);
}
return(BilevelType);
if (IsImageGray(image,exception) != MagickFalse)
{
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
return(GrayscaleMatteType);
return(GrayscaleType);
}
if (IsPaletteImage(image,exception) != MagickFalse)
{
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
return(PaletteMatteType);
return(PaletteType);
}
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
return(TrueColorMatteType);
return(TrueColorType);
}
if (type == UndefinedType)
return(MagickFalse);
((Image *) image)->type=type;
- if ((type == GrayscaleType) && (image->matte != MagickFalse))
+ if ((type == GrayscaleType) && (image->alpha_trait == BlendPixelTrait))
((Image *) image)->type=GrayscaleMatteType;
return(MagickTrue);
}
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- if (image->matte == MagickFalse)
+ if (image->alpha_trait != BlendPixelTrait)
return(MagickTrue);
image_view=AcquireVirtualCacheView(image,exception);
for (y=0; y < (ssize_t) image->rows; y++)
i;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(static) shared(status) \
+ #pragma omp parallel for schedule(static,4) shared(status) \
dynamic_number_threads(image,image->columns,1,1)
#endif
for (i=0; i < (ssize_t) image->colors; i++)
PixelTrait
traits;
- channel=GetPixelChannelMapChannel(image,i);
- traits=GetPixelChannelMapTraits(image,channel);
+ channel=GetPixelChannelChannel(image,i);
+ traits=GetPixelChannelTraits(image,channel);
if ((traits == UndefinedPixelTrait) ||
(channel == IndexPixelChannel) || (channel == MaskPixelChannel))
continue;
PixelTrait
traits;
- channel=GetPixelChannelMapChannel(image,i);
- traits=GetPixelChannelMapTraits(image,channel);
+ channel=GetPixelChannelChannel(image,i);
+ traits=GetPixelChannelTraits(image,channel);
if ((traits == UndefinedPixelTrait) || (channel == IndexPixelChannel) ||
(channel == MaskPixelChannel))
continue;
status=QuantizeImage(quantize_info,image,exception);
quantize_info=DestroyQuantizeInfo(quantize_info);
}
- image->matte=MagickFalse;
+ image->alpha_trait=UndefinedPixelTrait;
break;
}
case GrayscaleType:
{
if (IsImageGray(image,exception) == MagickFalse)
status=TransformImageColorspace(image,GRAYColorspace,exception);
- image->matte=MagickFalse;
+ image->alpha_trait=UndefinedPixelTrait;
break;
}
case GrayscaleMatteType:
{
if (IsImageGray(image,exception) == MagickFalse)
status=TransformImageColorspace(image,GRAYColorspace,exception);
- if (image->matte == MagickFalse)
+ if (image->alpha_trait != BlendPixelTrait)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
break;
}
status=QuantizeImage(quantize_info,image,exception);
quantize_info=DestroyQuantizeInfo(quantize_info);
}
- image->matte=MagickFalse;
+ image->alpha_trait=UndefinedPixelTrait;
break;
}
case PaletteBilevelMatteType:
if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
status=TransformImageColorspace(image,sRGBColorspace,exception);
- if (image->matte == MagickFalse)
+ if (image->alpha_trait != BlendPixelTrait)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
- channel_mask=SetPixelChannelMask(image,AlphaChannel);
+ channel_mask=SetImageChannelMask(image,AlphaChannel);
(void) BilevelImage(image,(double) QuantumRange/2.0,exception);
- (void) SetPixelChannelMask(image,channel_mask);
+ (void) SetImageChannelMask(image,channel_mask);
quantize_info=AcquireQuantizeInfo(image_info);
status=QuantizeImage(quantize_info,image,exception);
quantize_info=DestroyQuantizeInfo(quantize_info);
{
if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
status=TransformImageColorspace(image,sRGBColorspace,exception);
- if (image->matte == MagickFalse)
+ if (image->alpha_trait != BlendPixelTrait)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
quantize_info=AcquireQuantizeInfo(image_info);
quantize_info->colorspace=TransparentColorspace;
status=TransformImageColorspace(image,sRGBColorspace,exception);
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass,exception);
- image->matte=MagickFalse;
+ image->alpha_trait=UndefinedPixelTrait;
break;
}
case TrueColorMatteType:
status=TransformImageColorspace(image,sRGBColorspace,exception);
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass,exception);
- if (image->matte == MagickFalse)
+ if (image->alpha_trait != BlendPixelTrait)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
break;
}
}
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass,exception);
- image->matte=MagickFalse;
+ image->alpha_trait=UndefinedPixelTrait;
break;
}
case ColorSeparationMatteType:
}
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass,exception);
- if (image->matte == MagickFalse)
+ if (image->alpha_trait != BlendPixelTrait)
status=SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
break;
}