static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
- CacheView
- *image_view;
-
char
magick[4],
value[MaxTextExtent];
SetQuantumQuantum(quantum_info,32);
SetQuantumPack(quantum_info,dpx.image.image_element[0].packing == 0 ?
MagickTrue : MagickFalse);
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadDPXImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
continue;
}
- length=ImportQuantumPixels(image,image_view,quantum_info,quantum_type,
- pixels,exception);
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ length=ImportQuantumPixels(image,(const CacheView *) NULL,quantum_info,
+ quantum_type,pixels,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
depth,
max_value;
- CacheView
- *image_view;
-
/*
Open image file.
*/
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
SetQuantumMinIsWhite(quantum_info,MagickTrue);
extent=GetQuantumExtent(image,quantum_info,quantum_type);
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
continue;
}
- length=ImportQuantumPixels(image,image_view,quantum_info,quantum_type,
- pixels,exception);
+ length=ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ quantum_type,pixels,exception);
if (length != extent)
status=MagickFalse;
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
}
p=pixels;
if ((image->depth == 8) || (image->depth == 16))
- (void) ImportQuantumPixels(image,image_view,quantum_info,
+ (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
quantum_type,pixels,exception);
else
if (image->depth <= 8)
q++;
}
}
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
}
if ((type == BilevelType) || (type == GrayscaleType))
{
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,
- image->columns,1,exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
for (x=0; x < (long) image->columns; x++)
{
if ((type == BilevelType) &&
q++;
}
}
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
continue;
}
- indexes=GetCacheViewAuthenticIndexQueue(image_view);
+ indexes=GetAuthenticIndexQueue(image);
p=pixels;
if ((image->depth == 8) || (image->depth == 16))
- (void) ImportQuantumPixels(image,image_view,quantum_info,
+ (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
quantum_type,pixels,exception);
else
switch (quantum_type)
break;
}
}
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
SetQuantumScale(quantum_info,(MagickRealType) QuantumRange*
fabs(quantum_scale));
extent=GetQuantumExtent(image,quantum_info,quantum_type);
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
}
if ((size_t) count != extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,(long) (image->rows-
- offset-1),image->columns,1,exception);
+ q=QueueAuthenticPixels(image,0,(long) (image->rows-offset-1),
+ image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
continue;
}
- length=ImportQuantumPixels(image,image_view,quantum_info,quantum_type,
- pixels,exception);
+ length=ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ quantum_type,pixels,exception);
if (length != extent)
status=MagickFalse;
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");