CacheView
*image_view;
- Image
- *image;
-
MagickBooleanType
proceed;
- image=CloneImage(next,0,0,MagickTrue,exception);
- if (image == (Image *) NULL)
- break;
- (void) TransformImageColorspace(image,append_image->colorspace,exception);
SetGeometry(append_image,&geometry);
- GravityAdjustGeometry(image->columns,image->rows,image->gravity,&geometry);
+ GravityAdjustGeometry(next->columns,next->rows,next->gravity,&geometry);
if (stack != MagickFalse)
x_offset-=geometry.x;
else
y_offset-=geometry.y;
- image_view=AcquireVirtualCacheView(image,exception);
+ image_view=AcquireVirtualCacheView(next,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static,4) shared(status) \
- magick_threads(image,image,image->rows,1)
+ magick_threads(next,next,next->rows,1)
#endif
- for (y=0; y < (ssize_t) image->rows; y++)
+ for (y=0; y < (ssize_t) next->rows; y++)
{
MagickBooleanType
sync;
if (status == MagickFalse)
continue;
- p=GetCacheViewVirtualPixels(image_view,0,y,image->columns,1,exception);
+ p=GetCacheViewVirtualPixels(image_view,0,y,next->columns,1,exception);
q=QueueCacheViewAuthenticPixels(append_view,x_offset,y+y_offset,
- image->columns,1,exception);
+ next->columns,1,exception);
if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
{
status=MagickFalse;
continue;
}
- GetPixelInfo(image,&pixel);
- for (x=0; x < (ssize_t) image->columns; x++)
+ GetPixelInfo(next,&pixel);
+ for (x=0; x < (ssize_t) next->columns; x++)
{
- if (GetPixelReadMask(image,p) == 0)
+ if (GetPixelReadMask(next,p) == 0)
{
SetPixelBackgoundColor(append_image,q);
- p+=GetPixelChannels(image);
+ p+=GetPixelChannels(next);
q+=GetPixelChannels(append_image);
continue;
}
- GetPixelInfoPixel(image,p,&pixel);
+ GetPixelInfoPixel(next,p,&pixel);
SetPixelViaPixelInfo(append_image,&pixel,q);
- p+=GetPixelChannels(image);
+ p+=GetPixelChannels(next);
q+=GetPixelChannels(append_image);
}
sync=SyncCacheViewAuthenticPixels(append_view,exception);
image_view=DestroyCacheView(image_view);
if (stack == MagickFalse)
{
- x_offset+=(ssize_t) image->columns;
+ x_offset+=(ssize_t) next->columns;
y_offset=0;
}
else
{
x_offset=0;
- y_offset+=(ssize_t) image->rows;
+ y_offset+=(ssize_t) next->rows;
}
- image=DestroyImage(image);
proceed=SetImageProgress(append_image,AppendImageTag,n,number_images);
if (proceed == MagickFalse)
break;