MagickTrue : MagickFalse);
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+ #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
#endif
for (y=0; y < (long) image->rows; y++)
{
extent=GetQuantumExtent(image,quantum_info,quantum_type);
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+ #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
#endif
for (y=0; y < (long) image->rows; y++)
{
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+ #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
#endif
for (y=0; y < (long) image->rows; y++)
{
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
- #pragma omp parallel for schedule(static,1) shared(row,status,type)
+ #pragma omp parallel for schedule(static) shared(row,status,type)
#endif
for (y=0; y < (long) image->rows; y++)
{
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+ #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
#endif
for (y=0; y < (long) image->rows; y++)
{
extent=GetQuantumExtent(image,quantum_info,quantum_type);
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+ #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
#endif
for (y=0; y < (long) image->rows; y++)
{
exception=(&image->exception);
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(status)
+ #pragma omp parallel for schedule(static) shared(status)
#endif
for (y=0; y < (long) image->rows; y++)
{
Tile texture onto the image background.
*/
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(status)
+ #pragma omp parallel for schedule(static) shared(status)
#endif
for (y=0; y < (long) image->rows; y+=texture->rows)
{
image_view=AcquireCacheView(image);
texture_view=AcquireCacheView(texture);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
-#pragma omp parallel for schedule(dynamic,4) shared(status)
+ #pragma omp parallel for schedule(static) shared(status)
#endif
for (y=0; y < (long) image->rows; y++)
{
Draw sides of ornamental border.
*/
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status)
#endif
for (y=0; y < (long) image->rows; y++)
{
exception=(&image->exception);
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status)
#endif
for (y=0; y < (long) raise_info->height; y++)
{
image_view=AcquireCacheView(image);
blur_view=AcquireCacheView(blur_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status)
#endif
for (y=0; y < (long) image->rows; y++)
{
random_info=AcquireRandomInfoThreadSet();
image_view=AcquireCacheView(spread_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status)
#endif
for (y=0; y < (long) spread_image->rows; y++)
{
*/
GetPixelCacheTileSize(image,&tile_width,&tile_height);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress, status)
+ #pragma omp parallel for schedule(static) shared(progress, status)
#endif
for (tile_y=0; tile_y < (long) image->rows; tile_y+=tile_height)
{
Rotate 180 degrees.
*/
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress, status)
+ #pragma omp parallel for schedule(static) shared(progress, status)
#endif
for (y=0; y < (long) image->rows; y++)
{
*/
GetPixelCacheTileSize(image,&tile_width,&tile_height);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress, status)
+ #pragma omp parallel for schedule(static) shared(progress, status)
#endif
for (tile_y=0; tile_y < (long) image->rows; tile_y+=tile_height)
{
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Chop() removes a region of an image and collapses the image to occupy the
-% removed portion.
+% ChopImage() removes a region of an image and collapses the image to occupy
+% the removed portion.
%
% The format of the ChopImage method is:
%
y;
MagickBooleanType
- proceed;
+ proceed,
+ status;
RectangleInfo
extent;
/*
Extract chop image.
*/
+ status=MagickTrue;
i=0;
j=0;
image_view=AcquireCacheView(image);
chop_view=AcquireCacheView(chop_image);
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(static) shared(status)
+#endif
for (y=0; y < (long) extent.y; y++)
{
register const PixelPacket
register PixelPacket
*restrict q;
+ if (status == MagickFalse)
+ continue;
p=GetCacheViewVirtualPixels(image_view,0,i++,image->columns,1,exception);
q=QueueCacheViewAuthenticPixels(chop_view,0,j++,chop_image->columns,1,
exception);
if ((p == (const PixelPacket *) NULL) || (q == (PixelPacket *) NULL))
- break;
+ {
+ status=MagickFalse;
+ continue;
+ }
indexes=GetCacheViewAuthenticIndexQueue(image_view);
chop_indexes=GetCacheViewAuthenticIndexQueue(chop_view);
for (x=0; x < (long) image->columns; x++)
p++;
}
if (SyncCacheViewAuthenticPixels(chop_view,exception) == MagickFalse)
- break;
+ status=MagickFalse;
proceed=SetImageProgress(image,ChopImageTag,y,chop_image->rows);
if (proceed == MagickFalse)
- break;
+ status=MagickFalse;
}
/*
Extract chop image.
*/
i+=extent.height;
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(static) shared(status)
+#endif
for (y=0; y < (long) (image->rows-(extent.y+extent.height)); y++)
{
register const PixelPacket
register PixelPacket
*restrict q;
+ if (status == MagickFalse)
+ continue;
p=GetCacheViewVirtualPixels(image_view,0,i++,image->columns,1,exception);
q=QueueCacheViewAuthenticPixels(chop_view,0,j++,chop_image->columns,1,
exception);
if ((p == (PixelPacket *) NULL) || (q == (PixelPacket *) NULL))
- break;
+ {
+ status=MagickFalse;
+ continue;
+ }
indexes=GetCacheViewAuthenticIndexQueue(image_view);
chop_indexes=GetCacheViewAuthenticIndexQueue(chop_view);
for (x=0; x < (long) image->columns; x++)
p++;
}
if (SyncCacheViewAuthenticPixels(chop_view,exception) == MagickFalse)
- break;
+ status=MagickFalse;
proceed=SetImageProgress(image,ChopImageTag,y,chop_image->rows);
if (proceed == MagickFalse)
- break;
+ status=MagickFalse;
}
chop_view=DestroyCacheView(chop_view);
image_view=DestroyCacheView(image_view);
image_view=AcquireCacheView(image);
crop_view=AcquireCacheView(crop_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status)
#endif
for (y=0; y < (long) crop_image->rows; y++)
{
image_view=AcquireCacheView(image);
flip_view=AcquireCacheView(flip_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status)
#endif
for (y=0; y < (long) flip_image->rows; y++)
{
image_view=AcquireCacheView(image);
flop_view=AcquireCacheView(flop_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status)
#endif
for (y=0; y < (long) flop_image->rows; y++)
{