From e41d079d51dfd10e3bd64a009fff23bbd54b11e9 Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 4 Apr 2012 00:49:50 +0000 Subject: [PATCH] --- MagickCore/cache-private.h | 3 ++- coders/pattern.c | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/MagickCore/cache-private.h b/MagickCore/cache-private.h index 8f9ac6cda..a6be29f92 100644 --- a/MagickCore/cache-private.h +++ b/MagickCore/cache-private.h @@ -226,7 +226,8 @@ extern MagickPrivate const void extern MagickPrivate MagickBooleanType CacheComponentGenesis(void), - SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *) magick_hot_spot, + SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *) + magick_hot_spot, SyncImagePixelCache(Image *,ExceptionInfo *); extern MagickPrivate MagickSizeType diff --git a/coders/pattern.c b/coders/pattern.c index 2eff3cfc4..6c47af888 100644 --- a/coders/pattern.c +++ b/coders/pattern.c @@ -583,7 +583,7 @@ static const unsigned char static const unsigned char Horizontal2Image[] = { - 0x50, 0x34, 0x0A, 0x38, 0x20, 0x38, 0x0A, 0xFF, 0x00, 0xFF, 0x00, 0xFF, + 0x50, 0x34, 0x0A, 0x38, 0x20, 0x38, 0x0A, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00 }; @@ -593,9 +593,9 @@ static const unsigned char static const unsigned char Horizontal3Image[] = { - 0x50, 0x34, 0x0A, 0x39, 0x20, 0x39, 0x0A, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x80, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x80, + 0x50, 0x34, 0x0A, 0x39, 0x20, 0x39, 0x0A, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0x80, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0x80, }; /* @@ -774,7 +774,7 @@ static const unsigned char static const unsigned char Vertical2Image[] = { - 0x50, 0x34, 0x0A, 0x38, 0x20, 0x38, 0x0A, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, + 0x50, 0x34, 0x0A, 0x38, 0x20, 0x38, 0x0A, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA }; @@ -784,8 +784,8 @@ static const unsigned char static const unsigned char Vertical3Image[] = { - 0x50, 0x34, 0x0A, 0x39, 0x20, 0x39, 0x0A, 0x24, 0x80, 0x24, 0x80, 0x24, - 0x80, 0x24, 0x80, 0x24, 0x80, 0x24, 0x80, 0x24, 0x80, 0x24, 0x80, 0x24, + 0x50, 0x34, 0x0A, 0x39, 0x20, 0x39, 0x0A, 0x24, 0x80, 0x24, 0x80, 0x24, + 0x80, 0x24, 0x80, 0x24, 0x80, 0x24, 0x80, 0x24, 0x80, 0x24, 0x80, 0x24, 0x80 }; @@ -988,9 +988,13 @@ static Image *ReadPATTERNImage(const ImageInfo *image_info, Tile pattern across image canvas. */ pattern_image=image; - image=AcquireImage(blob_info,exception); - image->background_color=pattern_image->background_color; - (void) SetImageBackgroundColor(image,exception); + image=CloneImage(pattern_image,0,0,MagickTrue,exception); + (void) ParseAbsoluteGeometry(image_info->size,&image->extract_info); + image->columns=image->extract_info.width; + image->rows=image->extract_info.height; + image->offset=image->extract_info.x; + image->extract_info.x=0; + image->extract_info.y=0; (void) TextureImage(image,pattern_image,exception); pattern_image=DestroyImage(pattern_image); } -- 2.50.1