result=(MagickRealType) (pixel-value);
break;
}
+ case SumEvaluateOperator:
+ {
+ result=(MagickRealType) (pixel+value);
+ break;
+ }
case ThresholdEvaluateOperator:
{
result=(MagickRealType) (((MagickRealType) pixel <= value) ? 0 :
*evaluate_image;
MagickBooleanType
+ concurrent,
status;
MagickOffsetType
if ((next->columns != images->columns) || (next->rows != images->rows))
{
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "ImageWidthsOrHeightsDiffer","`%s'",images->filename);
+ "ImageWidthsOrHeightsDiffer","'%s'",images->filename);
return((Image *) NULL);
}
/*
{
evaluate_image=DestroyImage(evaluate_image);
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",images->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",images->filename);
return((Image *) NULL);
}
/*
status=MagickTrue;
progress=0;
random_info=AcquireRandomInfoThreadSet();
- evaluate_view=AcquireCacheView(evaluate_image);
+ concurrent=GetRandomSecretKey(random_info[0]) == ~0UL ? MagickTrue :
+ MagickFalse;
+ evaluate_view=AcquireAuthenticCacheView(evaluate_image,exception);
if (op == MedianEvaluateOperator)
{
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(static) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status) omp_concurrent(concurrent)
#endif
for (y=0; y < (ssize_t) evaluate_image->rows; y++)
{
register ssize_t
i;
- image_view=AcquireCacheView(next);
+ image_view=AcquireVirtualCacheView(next,exception);
p=GetCacheViewVirtualPixels(image_view,x,y,1,1,exception);
if (p == (const Quantum *) NULL)
{
else
{
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(static) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status) omp_concurrent(concurrent)
#endif
for (y=0; y < (ssize_t) evaluate_image->rows; y++)
{
register const Quantum
*p;
- image_view=AcquireCacheView(next);
+ image_view=AcquireVirtualCacheView(next,exception);
p=GetCacheViewVirtualPixels(image_view,0,y,next->columns,1,exception);
if (p == (const Quantum *) NULL)
{
register ssize_t
i;
- if (GetPixelMask(evaluate_image,p) != 0)
+ if (GetPixelMask(next,p) != 0)
{
- p+=GetPixelChannels(evaluate_image);
+ p+=GetPixelChannels(next);
continue;
}
for (i=0; i < (ssize_t) GetPixelChannels(next); i++)
*image_view;
MagickBooleanType
+ concurrent,
status;
MagickOffsetType
status=MagickTrue;
progress=0;
random_info=AcquireRandomInfoThreadSet();
- image_view=AcquireCacheView(image);
+ concurrent=GetRandomSecretKey(random_info[0]) == ~0UL ? MagickTrue :
+ MagickFalse;
+ image_view=AcquireAuthenticCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(static,4) shared(progress,status)
+ #pragma omp parallel for schedule(static,4) shared(progress,status) omp_concurrent(concurrent)
#endif
for (y=0; y < (ssize_t) image->rows; y++)
{
traits=GetPixelChannelMapTraits(image,channel);
if (traits == UndefinedPixelTrait)
continue;
+ if ((traits & CopyPixelTrait) != 0)
+ continue;
q[i]=ClampToQuantum(ApplyEvaluateOperator(random_info[id],q[i],op,
value));
}
return(MagickFalse);
status=MagickTrue;
progress=0;
- image_view=AcquireCacheView(image);
+ image_view=AcquireAuthenticCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static,4) shared(progress,status)
#endif
sum_squares=0.0;
sum_cubes=0.0;
sum_fourth_power=0.0;
- image_view=AcquireCacheView(image);
+ image_view=AcquireVirtualCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) shared(status)
#endif
status=MagickTrue;
*maxima=(-MagickHuge);
*minima=MagickHuge;
- image_view=AcquireCacheView(image);
+ image_view=AcquireVirtualCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) shared(status)
#endif
#pragma omp critical (MagickCore_GetImageRange)
#endif
{
- if (p[i] < *minima)
+ if ((double) p[i] < *minima)
*minima=(double) p[i];
- if (p[i] > *maxima)
+ if ((double) p[i] > *maxima)
*maxima=(double) p[i];
}
}
(MagickMax(height,1)/2L)+GetPixelChannels(image)*(MagickMax(width,1)/2L);
status=MagickTrue;
progress=0;
- image_view=AcquireCacheView(image);
- statistic_view=AcquireCacheView(statistic_image);
+ image_view=AcquireVirtualCacheView(image,exception);
+ statistic_view=AcquireAuthenticCacheView(statistic_image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static,4) shared(progress,status)
#endif