% July 2009 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/property.h"
#include "MagickCore/quantum-private.h"
+#include "MagickCore/resource_.h"
#include "MagickCore/thread-private.h"
#if defined(MAGICKCORE_FFTW_DELEGATE)
#if defined(MAGICKCORE_HAVE_COMPLEX_H)
if (phase_image == (Image *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),ImageError,
- "ImageSequenceRequired","`%s'",image->filename);
+ "TwoOrMoreImagesRequired","'%s'",image->filename);
return(MagickFalse);
}
/*
if (phase_source == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",image->filename);
magnitude_source=(double *) RelinquishMagickMemory(magnitude_source);
return(MagickFalse);
}
i++;
}
}
- magnitude_view=AcquireCacheView(magnitude_image);
- phase_view=AcquireCacheView(phase_image);
+ magnitude_view=AcquireAuthenticCacheView(magnitude_image,exception);
i=0L;
for (y=0L; y < (ssize_t) fourier_info->height; y++)
{
if (status == MagickFalse)
break;
}
+ magnitude_view=DestroyCacheView(magnitude_view);
i=0L;
+ phase_view=AcquireAuthenticCacheView(phase_image,exception);
for (y=0L; y < (ssize_t) fourier_info->height; y++)
{
q=GetCacheViewAuthenticPixels(phase_view,0L,y,fourier_info->height,1UL,
break;
}
phase_view=DestroyCacheView(phase_view);
- magnitude_view=DestroyCacheView(magnitude_view);
phase_source=(double *) RelinquishMagickMemory(phase_source);
magnitude_source=(double *) RelinquishMagickMemory(magnitude_source);
return(status);
if (source == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",image->filename);
return(MagickFalse);
}
ResetMagickMemory(source,0,fourier_info->height*fourier_info->width*
sizeof(*source));
i=0L;
- image_view=AcquireCacheView(image);
+ image_view=AcquireVirtualCacheView(image,exception);
for (y=0L; y < (ssize_t) fourier_info->height; y++)
{
p=GetCacheViewVirtualPixels(image_view,0L,y,fourier_info->width,1UL,
if (fourier == (fftw_complex *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",image->filename);
source=(double *) RelinquishMagickMemory(source);
return(MagickFalse);
}
if (magnitude == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",image->filename);
return(MagickFalse);
}
phase=(double *) AcquireQuantumMemory((size_t) fourier_info.height,
if (phase == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",image->filename);
magnitude=(double *) RelinquishMagickMemory(magnitude);
return(MagickFalse);
}
if (fourier == (fftw_complex *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",image->filename);
phase=(double *) RelinquishMagickMemory(phase);
magnitude=(double *) RelinquishMagickMemory(magnitude);
return(MagickFalse);
#if !defined(MAGICKCORE_FFTW_DELEGATE)
(void) modulus;
(void) ThrowMagickException(exception,GetMagickModule(),
- MissingDelegateWarning,"DelegateLibrarySupportNotBuiltIn","`%s' (FFTW)",
+ MissingDelegateWarning,"DelegateLibrarySupportNotBuiltIn","'%s' (FFTW)",
image->filename);
#else
{
status=MagickTrue;
is_gray=IsImageGray(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel sections
+ #pragma omp parallel sections
#endif
{
#if defined(MAGICKCORE_OPENMP_SUPPORT)
if (magnitude_source == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",
magnitude_image->filename);
return(MagickFalse);
}
if (phase_source == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",
magnitude_image->filename);
magnitude_source=(double *) RelinquishMagickMemory(magnitude_source);
return(MagickFalse);
}
i=0L;
- magnitude_view=AcquireCacheView(magnitude_image);
+ magnitude_view=AcquireVirtualCacheView(magnitude_image,exception);
for (y=0L; y < (ssize_t) fourier_info->height; y++)
{
p=GetCacheViewVirtualPixels(magnitude_view,0L,y,fourier_info->width,1UL,
}
}
i=0L;
- phase_view=AcquireCacheView(phase_image);
+ phase_view=AcquireVirtualCacheView(phase_image,exception);
for (y=0L; y < (ssize_t) fourier_info->height; y++)
{
p=GetCacheViewVirtualPixels(phase_view,0,y,fourier_info->width,1,
if (magnitude == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",
magnitude_image->filename);
magnitude_source=(double *) RelinquishMagickMemory(magnitude_source);
phase_source=(double *) RelinquishMagickMemory(phase_source);
if (phase == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",
magnitude_image->filename);
phase_source=(double *) RelinquishMagickMemory(phase_source);
return(MagickFalse);
if (source == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",image->filename);
return(MagickFalse);
}
#if defined(MAGICKCORE_OPENMP_SUPPORT)
fftw_destroy_plan(fftw_c2r_plan);
}
i=0L;
- image_view=AcquireCacheView(image);
+ image_view=AcquireAuthenticCacheView(image,exception);
for (y=0L; y < (ssize_t) fourier_info->height; y++)
{
if (y >= (ssize_t) image->rows)
if (magnitude == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",
magnitude_image->filename);
return(MagickFalse);
}
if (phase == (double *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",
magnitude_image->filename);
magnitude=(double *) RelinquishMagickMemory(magnitude);
return(MagickFalse);
if (fourier == (fftw_complex *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",
magnitude_image->filename);
phase=(double *) RelinquishMagickMemory(phase);
magnitude=(double *) RelinquishMagickMemory(magnitude);
if (phase_image == (Image *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),ImageError,
- "ImageSequenceRequired","`%s'",magnitude_image->filename);
+ "TwoOrMoreImagesRequired","'%s'",magnitude_image->filename);
return((Image *) NULL);
}
#if !defined(MAGICKCORE_FFTW_DELEGATE)
fourier_image=(Image *) NULL;
(void) modulus;
(void) ThrowMagickException(exception,GetMagickModule(),
- MissingDelegateWarning,"DelegateLibrarySupportNotBuiltIn","`%s' (FFTW)",
+ MissingDelegateWarning,"DelegateLibrarySupportNotBuiltIn","'%s' (FFTW)",
magnitude_image->filename);
#else
{