length,
number_pixels;
+ NexusInfo
+ *magick_restrict virtual_nexus;
+
Quantum
*magick_restrict pixels,
virtual_pixel[MaxPixelChannels];
nexus_info->region.width-1L;
number_pixels=(MagickSizeType) cache_info->columns*cache_info->rows;
if ((offset >= 0) && (((MagickSizeType) offset+length) < number_pixels))
- if ((x >= 0) && ((ssize_t) (x+columns) <= (ssize_t) cache_info->columns) &&
- (y >= 0) && ((ssize_t) (y+rows) <= (ssize_t) cache_info->rows))
+ if ((x >= 0) && ((ssize_t) (x+columns-1) < (ssize_t) cache_info->columns) &&
+ (y >= 0) && ((ssize_t) (y+rows-1) < (ssize_t) cache_info->rows))
{
MagickBooleanType
status;
/*
Pixel request is outside cache extents.
*/
+ virtual_nexus=nexus_info->pixel_nexus;
s=(unsigned char *) nexus_info->metacontent;
(void) memset(virtual_pixel,0,cache_info->number_channels*
sizeof(*virtual_pixel));
{
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
EdgeX(x_offset,cache_info->columns),
- EdgeY(y_offset,cache_info->rows),1UL,1UL,
- nexus_info->pixel_nexus,exception);
+ EdgeY(y_offset,cache_info->rows),1UL,1UL,virtual_nexus,
+ exception);
r=GetVirtualMetacontentFromNexus(cache_info,
nexus_info->pixel_nexus);
break;
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
RandomX(cache_info->random_info,cache_info->columns),
RandomY(cache_info->random_info,cache_info->rows),1UL,1UL,
- nexus_info->pixel_nexus,exception);
- r=GetVirtualMetacontentFromNexus(cache_info,
- nexus_info->pixel_nexus);
+ virtual_nexus,exception);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
break;
}
case DitherVirtualPixelMethod:
{
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
DitherX(x_offset,cache_info->columns),
- DitherY(y_offset,cache_info->rows),1UL,1UL,
- nexus_info->pixel_nexus,exception);
- r=GetVirtualMetacontentFromNexus(cache_info,
- nexus_info->pixel_nexus);
+ DitherY(y_offset,cache_info->rows),1UL,1UL,virtual_nexus,
+ exception);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
break;
}
case TileVirtualPixelMethod:
x_modulo=VirtualPixelModulo(x_offset,cache_info->columns);
y_modulo=VirtualPixelModulo(y_offset,cache_info->rows);
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
- x_modulo.remainder,y_modulo.remainder,1UL,1UL,
- nexus_info->pixel_nexus,exception);
- r=GetVirtualMetacontentFromNexus(cache_info,
- nexus_info->pixel_nexus);
+ x_modulo.remainder,y_modulo.remainder,1UL,1UL,virtual_nexus,
+ exception);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
break;
}
case MirrorVirtualPixelMethod:
y_modulo.remainder=(ssize_t) cache_info->rows-
y_modulo.remainder-1L;
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
- x_modulo.remainder,y_modulo.remainder,1UL,1UL,
- nexus_info->pixel_nexus,exception);
- r=GetVirtualMetacontentFromNexus(cache_info,
- nexus_info->pixel_nexus);
+ x_modulo.remainder,y_modulo.remainder,1UL,1UL,virtual_nexus,
+ exception);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
break;
}
case HorizontalTileEdgeVirtualPixelMethod:
x_modulo=VirtualPixelModulo(x_offset,cache_info->columns);
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
x_modulo.remainder,EdgeY(y_offset,cache_info->rows),1UL,1UL,
- nexus_info->pixel_nexus,exception);
- r=GetVirtualMetacontentFromNexus(cache_info,
- nexus_info->pixel_nexus);
+ virtual_nexus,exception);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
break;
}
case VerticalTileEdgeVirtualPixelMethod:
y_modulo=VirtualPixelModulo(y_offset,cache_info->rows);
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
EdgeX(x_offset,cache_info->columns),y_modulo.remainder,1UL,1UL,
- nexus_info->pixel_nexus,exception);
- r=GetVirtualMetacontentFromNexus(cache_info,
- nexus_info->pixel_nexus);
+ virtual_nexus,exception);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
break;
}
case BackgroundVirtualPixelMethod:
break;
}
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
- x_modulo.remainder,y_modulo.remainder,1UL,1UL,
- nexus_info->pixel_nexus,exception);
- r=GetVirtualMetacontentFromNexus(cache_info,
- nexus_info->pixel_nexus);
+ x_modulo.remainder,y_modulo.remainder,1UL,1UL,virtual_nexus,
+ exception);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
break;
}
case HorizontalTileVirtualPixelMethod:
x_modulo=VirtualPixelModulo(x_offset,cache_info->columns);
y_modulo=VirtualPixelModulo(y_offset,cache_info->rows);
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
- x_modulo.remainder,y_modulo.remainder,1UL,1UL,
- nexus_info->pixel_nexus,exception);
- r=GetVirtualMetacontentFromNexus(cache_info,
- nexus_info->pixel_nexus);
+ x_modulo.remainder,y_modulo.remainder,1UL,1UL,virtual_nexus,
+ exception);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
break;
}
case VerticalTileVirtualPixelMethod:
x_modulo=VirtualPixelModulo(x_offset,cache_info->columns);
y_modulo=VirtualPixelModulo(y_offset,cache_info->rows);
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,
- x_modulo.remainder,y_modulo.remainder,1UL,1UL,
- nexus_info->pixel_nexus,exception);
- r=GetVirtualMetacontentFromNexus(cache_info,
- nexus_info->pixel_nexus);
+ x_modulo.remainder,y_modulo.remainder,1UL,1UL,virtual_nexus,
+ exception);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
break;
}
}
Transfer a run of pixels.
*/
p=GetVirtualPixelCacheNexus(image,virtual_pixel_method,x_offset,y_offset,
- (size_t) length,1UL,nexus_info->pixel_nexus,exception);
+ (size_t) length,1UL,virtual_nexus,exception);
if (p == (const Quantum *) NULL)
break;
- r=GetVirtualMetacontentFromNexus(cache_info,nexus_info->pixel_nexus);
+ r=GetVirtualMetacontentFromNexus(cache_info,virtual_nexus);
(void) memcpy(q,p,(size_t) (cache_info->number_channels*length*
sizeof(*p)));
q+=cache_info->number_channels*length;