}
cache_offset=cache_info->offset;
}
+if (0)
if ((cache_info->type != MemoryCache) && (clone_info->type != MemoryCache) &&
(strcmp(cache_info->cache_filename,clone_info->cache_filename) == 0))
{
}
if (clone_info->type == DiskCache)
{
- (void) ClosePixelCacheOnDisk(clone_info);
if (OpenPixelCacheOnDisk(clone_info,WriteMode) == MagickFalse)
{
if (cache_info->type == DiskCache)
if (cache_info->metacontent_extent != 0)
cache_info->metacontent=(void *) (cache_info->pixels+
number_pixels*cache_info->number_channels);
- if (source_info.storage_class != UndefinedClass)
+ if (source_info.type != UndefinedCache)
{
status=ClonePixelCachePixels(cache_info,&source_info,
exception);
"CacheResourcesExhausted","`%s'",image->filename);
return(MagickFalse);
}
+ if (source_info.type != UndefinedCache)
+ {
+ (void) ClosePixelCacheOnDisk(cache_info);
+ *cache_info->cache_filename='\0';
+ }
if (OpenPixelCacheOnDisk(cache_info,mode) == MagickFalse)
{
RelinquishMagickResource(DiskResource,cache_info->length);
if (cache_info->metacontent_extent != 0)
cache_info->metacontent=(void *) (cache_info->pixels+
number_pixels*cache_info->number_channels);
- if (source_info.storage_class != UndefinedClass)
+ if (source_info.type != UndefinedCache)
{
status=ClonePixelCachePixels(cache_info,&source_info,
exception);
RelinquishMagickResource(MapResource,cache_info->length);
}
status=MagickTrue;
- if ((source_info.type != UndefinedCache) && (mode != ReadMode))
+ if (source_info.type != UndefinedCache)
{
status=ClonePixelCachePixels(cache_info,&source_info,exception);
RelinquishPixelCachePixels(&source_info);
/*
Initialize histogram.
*/
+ SyncImagePixelCache(image,exception);
InitializeHistogram(image,histogram,exception);
(void) OptimalTau(histogram[Red],Tau,0.2,DeltaTau,
smooth_threshold == 0.0 ? 1.0 : smooth_threshold,extrema[Red]);
traits=GetPixelChannelMapTraits(image,channel);
if (traits == UndefinedPixelTrait)
continue;
- if ((traits & UpdatePixelTrait) == 0)
- continue;
pixel=QuantumScale*p[i];
for (j=0; j < (ssize_t) sizeof(pixel); j++)
*q++=(unsigned char) (&pixel)[j];
# 1) Test Monochrome PNG
#
testRead( 'input_mono.png',
- '4c8ba149f3b22a9d846e72e8317834871f5fb173799620d4d059e62f69576846' );
+ '7e704fc1a99118630a92374ba27adf5baf69f30019016be2ed70eac79629e8b4' );
#
# 2) Test 256 color pseudocolor PNG
#
++$test;
testRead( 'input_256.png',
- 'c45a7f8b2d978f5d92f70ddc40e0a7fec30dc3243facdb293f2245952ed68de1' );
+ '4404bce58d768dda28165b81ad6618e6fd6553996a44e62486f4d46c6ac7e593' );
#
# 3) Test TrueColor PNG
#
++$test;
testRead( 'input.mng',
- 'ece756f9de4c618819cf88c8561630518a9cf39ce09a81bf7c78445d9f00e09d' );
+ '70e2aabf6c94d5fb8660c3a4cec5ecce72f5b6b3f98a8617a2db5d3519db6ae0' );
#
# 5) Test 16-bit Portable Network Graphics
++$test;
testRead( 'input_16.png',
'6b6761c8108b1616e9411c4ef2564505715a37b93e86d2c824c9a4bca31bf47b',
- '106f0647ae10a6516b1ab2968038161e287ef40d1b22ca047531ed768e594ef1');
+ '5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee');
#
print( "1-bit grayscale PNG ...\n" );
testRead( 'input_bw.png',
- '5ace96fd545d2f4479f2e7a8f6f8f6cb1fd7cd277ae35559dffc825fd2a670f6' );
+ 'fe660b68ebf6e851ed91840b8ff8b083fcf8a58f675c8d699516e01a9946d85a' );
#
# 2) Test Monochrome PNG
++$test;
print( "8-bit grayscale PNG ...\n" );
testRead( 'input_mono.png',
- '4c8ba149f3b22a9d846e72e8317834871f5fb173799620d4d059e62f69576846' );
+ '7e704fc1a99118630a92374ba27adf5baf69f30019016be2ed70eac79629e8b4' );
#
# 3) Test 16-bit Portable Network Graphics
print( "16-bit grayscale PNG ...\n" );
testRead( 'input_16.png',
'6b6761c8108b1616e9411c4ef2564505715a37b93e86d2c824c9a4bca31bf47b',
- '106f0647ae10a6516b1ab2968038161e287ef40d1b22ca047531ed768e594ef1' );
+ '5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee' );
#
# 4) Test 256 color pseudocolor PNG
#
++$test;
print( "8-bit indexed-color PNG ...\n" );
testRead( 'input_256.png',
- 'c45a7f8b2d978f5d92f70ddc40e0a7fec30dc3243facdb293f2245952ed68de1' );
+ '4404bce58d768dda28165b81ad6618e6fd6553996a44e62486f4d46c6ac7e593' );
#
# 5) Test TrueColor PNG
++$test;
print( "MNG with 24-bit Truecolor PNGs...\n" );
testRead( 'input.mng',
- 'ece756f9de4c618819cf88c8561630518a9cf39ce09a81bf7c78445d9f00e09d' );
+ '70e2aabf6c94d5fb8660c3a4cec5ecce72f5b6b3f98a8617a2db5d3519db6ae0' );
testReadWrite( 'input_256.png',
'output_256.png',
q/quality=>54/,
- 'c45a7f8b2d978f5d92f70ddc40e0a7fec30dc3243facdb293f2245952ed68de1' );
+ '4404bce58d768dda28165b81ad6618e6fd6553996a44e62486f4d46c6ac7e593' );
#
# 2) Test truecolor image
++$test;
testReadWrite( 'input_mono.png',
'output_mono.png', '',
- '4c8ba149f3b22a9d846e72e8317834871f5fb173799620d4d059e62f69576846' );
+ '7e704fc1a99118630a92374ba27adf5baf69f30019016be2ed70eac79629e8b4' );
#
# 4) Test Multiple-image Network Graphics
testReadWrite( 'input.mng',
'output.mng',
q/quality=>55/,
- 'ece756f9de4c618819cf88c8561630518a9cf39ce09a81bf7c78445d9f00e09d' );
+ '70e2aabf6c94d5fb8660c3a4cec5ecce72f5b6b3f98a8617a2db5d3519db6ae0' );
#
# 5) Test 16-bit Portable Network Graphics
'output_16.png',
q/quality=>55/,
'fa6b164245b385b3dea5764074be2c959a503dde90ecb1d4ba9c76a46bb8e4e6',
- '106f0647ae10a6516b1ab2968038161e287ef40d1b22ca047531ed768e594ef1');
+ '5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee');
#
print( "1-bit grayscale PNG ...\n" );
testReadWrite( 'input_bw.png', 'output_bw.png', q/quality=>95/,
- '5ace96fd545d2f4479f2e7a8f6f8f6cb1fd7cd277ae35559dffc825fd2a670f6');
+ 'fe660b68ebf6e851ed91840b8ff8b083fcf8a58f675c8d699516e01a9946d85a');
#
# 2) Test monochrome image
print( "8-bit grayscale PNG ...\n" );
testReadWrite( 'input_mono.png',
'output_mono.png', '',
- '4c8ba149f3b22a9d846e72e8317834871f5fb173799620d4d059e62f69576846');
+ '7e704fc1a99118630a92374ba27adf5baf69f30019016be2ed70eac79629e8b4');
#
# 3) Test 16-bit Portable Network Graphics
#
'output_16.png',
q/quality=>55/,
'fa6b164245b385b3dea5764074be2c959a503dde90ecb1d4ba9c76a46bb8e4e6',
- '106f0647ae10a6516b1ab2968038161e287ef40d1b22ca047531ed768e594ef1' );
+ '5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee' );
#
# 4) Test pseudocolor image
#
testReadWrite( 'input_256.png',
'output_256.png',
q/quality=>54/,
- 'c45a7f8b2d978f5d92f70ddc40e0a7fec30dc3243facdb293f2245952ed68de1' );
+ '4404bce58d768dda28165b81ad6618e6fd6553996a44e62486f4d46c6ac7e593' );
#
# 5) Test truecolor image
#
testReadWrite( 'input.mng',
'output.mng',
q/quality=>55/,
- 'ece756f9de4c618819cf88c8561630518a9cf39ce09a81bf7c78445d9f00e09d' );
+ '70e2aabf6c94d5fb8660c3a4cec5ecce72f5b6b3f98a8617a2db5d3519db6ae0' );
++$test;
print("PseudoColor (16 color)...\n");
testRead( 'input_16.tiff',
- '4c8ba149f3b22a9d846e72e8317834871f5fb173799620d4d059e62f69576846' );
+ '7e704fc1a99118630a92374ba27adf5baf69f30019016be2ed70eac79629e8b4' );
#
# 3) Test reading PseudoColor (16 color + matte channel)
++$test;
print("PseudoColor (16 color + matte channel)...\n");
testRead( 'input_16_matte.tiff',
- '4c8ba149f3b22a9d846e72e8317834871f5fb173799620d4d059e62f69576846' );
+ '7e704fc1a99118630a92374ba27adf5baf69f30019016be2ed70eac79629e8b4' );
#
# 4) Test reading PseudoColor (256 color)
++$test;
print("PseudoColor (256 color) ...\n");
testRead( 'input_256.tiff',
- '48113b47a70a1d8dc046327cb9c799ed265e5d76a5eb0495d142015c4bd44b23' );
+ '1280e7ed7094aaae47c0be1cb0b6d33660e59483a5500f5f40e34940346f7847' );
#
# 5) Test reading PseudoColor (256 color + matte channel)
++$test;
print("PseudoColor (256 color + matte channel) ...\n");
testRead( 'input_256_matte.tiff',
- 'f50dea7da00ff27cc5fd5bc66bf0146b68b207ea7df919f72c4ccb02cb40f759' );
+ 'f3dc959e76f722bbc0a4338e2ed6650d73be3a81774c55210118531333fe6daa' );
#
# 6) Test reading PseudoColor using contiguous planar packing
++$test;
print("PseudoColor (256 color) contiguous planes ...\n");
testRead( 'input_256_planar_contig.tiff',
- '48113b47a70a1d8dc046327cb9c799ed265e5d76a5eb0495d142015c4bd44b23' );
+ '1280e7ed7094aaae47c0be1cb0b6d33660e59483a5500f5f40e34940346f7847' );
#
# 7) Test reading PseudoColor using seperate planes
++$test;
print("PseudoColor (256 color) seperate planes ...\n");
testRead( 'input_256_planar_separate.tiff',
- '48113b47a70a1d8dc046327cb9c799ed265e5d76a5eb0495d142015c4bd44b23' );
+ '1280e7ed7094aaae47c0be1cb0b6d33660e59483a5500f5f40e34940346f7847' );
#
# 8) Test Reading TrueColor (8-bit)
++$test;
print("Grayscale (8-bit + matte) ...\n");
testRead( 'input_gray_8bit_matte.tiff',
- '44cb1a46bd5a147f446b18cea8b07cfdf31acdc856029f95d91193add5c11b85' );
+ 'e87923c84a9140824abbb3683d603c19e8b1b08b926d78f794c5ea813db53615' );
#
# 15) Test Reading Grayscale 12-bit
testReadWrite( 'input_16.tiff',
'output_16.tiff',
q//,
- '4c8ba149f3b22a9d846e72e8317834871f5fb173799620d4d059e62f69576846');
+ '7e704fc1a99118630a92374ba27adf5baf69f30019016be2ed70eac79629e8b4');
#
# 2) Test 8-bit pseudocolor image
testReadWrite( 'input_256.tiff',
'output_256.tiff',
q//,
- '48113b47a70a1d8dc046327cb9c799ed265e5d76a5eb0495d142015c4bd44b23');
+ '1280e7ed7094aaae47c0be1cb0b6d33660e59483a5500f5f40e34940346f7847');
#
# 3) Test 4-bit pseudocolor + matte channel image
testReadWrite( 'input_16_matte.tiff',
'output_16_matte.tiff',
q//,
- '4c8ba149f3b22a9d846e72e8317834871f5fb173799620d4d059e62f69576846' );
+ '7e704fc1a99118630a92374ba27adf5baf69f30019016be2ed70eac79629e8b4' );
#
# 4) Test 8-bit pseudocolor + matte channel image
testReadWrite( 'input_256_matte.tiff',
'output_256_matte.tiff',
q//,
- 'f50dea7da00ff27cc5fd5bc66bf0146b68b207ea7df919f72c4ccb02cb40f759' );
+ 'f3dc959e76f722bbc0a4338e2ed6650d73be3a81774c55210118531333fe6daa' );
#
# 5) Test truecolor image
testReadWrite( 'input_gray_4bit_matte.tiff',
'output_gray_4bit_matte.tiff',
q//,
- '44cb1a46bd5a147f446b18cea8b07cfdf31acdc856029f95d91193add5c11b85' );
+ 'be4a2a4e26725e6bfd9d55ef44cdc6f6bc0808922676ff048f3a9df55a79a26b' );
#
# 10) Test gray 8 bit image (with matte channel)
testReadWrite( 'input_gray_8bit_matte.tiff',
'output_gray_8bit_matte.tiff',
q//,
- '44cb1a46bd5a147f446b18cea8b07cfdf31acdc856029f95d91193add5c11b85' );
+ 'e87923c84a9140824abbb3683d603c19e8b1b08b926d78f794c5ea813db53615' );
testReadWrite( 'AVS:input.avs',
'AVS:output.avs',
q//,
- '6a4a257921582768b774aeeac549b7c0c0b51f665395eddf921cce53a0ad2a33');
+ 'e7d406ec41fe69ba2bd88dd59e5eb17a83f17c0a99519def02c020041144f5b3');
print("Microsoft Windows bitmap image file ...\n");
++$test;
testReadWrite( 'BMP:input.bmp',
'BMP:output.bmp',
q//,
- '32d82b4ab7a2527d0b886ccdd60990f6f7e4a411181337bd033760256c0d596c');
+ 'ae2007d0e05933a72294a6f8c7b59fc54d5fa3039f0f13bf8d65d05044ef2f39');
print("Microsoft Windows 24-bit bitmap image file ...\n");
++$test;
q//,
'6a4a257921582768b774aeeac549b7c0c0b51f665395eddf921cce53a0ad2a33');
-
print("ZSoft IBM PC multi-page Paintbrush file ...\n");
++$test;
testReadWrite( 'DCX:input.dcx',
testReadWrite( 'GIF:input.gif',
'GIF:output.gif',
q//,
- '32d82b4ab7a2527d0b886ccdd60990f6f7e4a411181337bd033760256c0d596c');
+ 'ae2007d0e05933a72294a6f8c7b59fc54d5fa3039f0f13bf8d65d05044ef2f39');
print("CompuServe graphics interchange format (1987) ...\n");
++$test;
testReadWrite( 'GIF87:input.gif87',
'GIF87:output.gif87',
q//,
- 'd8938f29cbd56aa164bf8265f385d9ec872be75fe08401601b68eee159df8cd9');
+ 'a037bce490abf358b3c8e1f471a83d15434da26d6c91aa6d761407c0df573f1d');
print("Magick image file format ...\n");
++$test;
testReadWrite( 'SUN:input.im1',
'SUN:output.im1',
q//,
- '31d166e543d44963cc8a500212ae60c1c6f040fac3117748bcd54174727b45e1');
+ 'cf6e645339d1bb82131ad658f2e7521f1e8aac69eb6e7add728f6157489972cd');
print("SUN 8-bit Rasterfile ...\n");
++$test;
testReadWrite( 'SUN:input.im8',
'SUN:output.im8',
q//,
- '88528b9fde504a6388f0db5a351e3373ea15607e18a0c2d0e7e0fe4c851cce10');
+ '6b894bae0411f6f21e76724047cc93e28a2b04176df31d0632b656e98ce9b6e8');
print("SUN True-Color Rasterfile ...\n");
++$test;
'VIFF:output.viff',
q//,
'7f2c98e7ce98983509580eaeb3bb6a420e3f358b39fcec4cdd96982ae1e21882',
- '409e646b6ba024c597a6b2c34754bf23713857e367047e7ea15615d8bd0fd028',
+ 'bbeaa063bd13c74414a9962f21a795844661b596bd89f753f064ba1db2624d03',
'aa4a6154f3c314d99c257280faf9097f3863a132ec8bddbc3b68209ce2c19487');
print("WBMP (Wireless Bitmap (level 0) image) ...\n");
'WBMP:output.wbmp',
q//,
'b7b682361e82d9d7cf2bed34f76af87576b97590b12d76b961104e53ee18ee74',
- 'd386466607cfcec0625943f277454d66cce1d17696d482f50103a25a04bd1070',
+ '6d1374fa22aa5cb8fa9e98b928b8dea6e5fc6606ed2dc07c5f27d1e03e494d0e',
'd818195f73f8d5db624c8f87a706bbcb3179dbb7a7f08abbad5b12cd97de8fe6');
print("X Windows system bitmap (black and white only) ...\n");
testReadWrite( 'XBM:input.xbm',
'XBM:output.xbm',
q//,
- '31d166e543d44963cc8a500212ae60c1c6f040fac3117748bcd54174727b45e1');
+ 'cf6e645339d1bb82131ad658f2e7521f1e8aac69eb6e7add728f6157489972cd');
print("X Windows system pixmap file (color) ...\n");
++$test;
testReadWrite( 'XPM:input.xpm',
'XPM:output.xpm',
q//,
- '88528b9fde504a6388f0db5a351e3373ea15607e18a0c2d0e7e0fe4c851cce10');
+ '6b894bae0411f6f21e76724047cc93e28a2b04176df31d0632b656e98ce9b6e8');
print("CMYK format ...\n");
++$test;
'70x46',
8,
q//,
- '6a4a257921582768b774aeeac549b7c0c0b51f665395eddf921cce53a0ad2a33' );
+ 'e7d406ec41fe69ba2bd88dd59e5eb17a83f17c0a99519def02c020041144f5b3' );
1;