]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 1 Jan 2012 01:45:57 +0000 (01:45 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 1 Jan 2012 01:45:57 +0000 (01:45 +0000)
PerlMagick/t/tiff/read.t
PerlMagick/t/tiff/write.t
PerlMagick/t/write.t
coders/tiff.c

index f957e891a2a2c6277346e858252921b55a352584..1311037227bf3c11c1bb8bd52c4f60d5b5eaf3d3 100644 (file)
@@ -19,7 +19,7 @@ chdir 't/tiff' || die 'Cd failed';
 # 
 print("Monochrome ...\n");
 testRead ( 'input_mono.tiff',
-  '57fc672e7e231d3f92793d9b2073132def273f4be3115bcbed1c49a1c3131222' );
+  'c8c4f812d902693d1de6c74a6cffaaef7506bd868df65cae63b06707f2c9f3ac' );
 
 #
 # 2) Test reading PseudoColor (16 color)
@@ -108,7 +108,7 @@ testRead( 'input_truecolor_stripped.tiff',
 ++$test;
 print("Grayscale (4-bit) ...\n");
 testRead( 'input_gray_4bit.tiff',
-  'a3ae7f6908bb538751f59565dd17f28f83201620ca3ccc8a87a388b3d4c50232');
+  'be370e06f1aad47490e88b5212002c89520b07af6764690b3cee4cb9f1343df9');
 
 #
 # 13) Test Reading Grayscale 8-bit
@@ -116,7 +116,7 @@ testRead( 'input_gray_4bit.tiff',
 ++$test;
 print("Grayscale (8-bit) ...\n");
 testRead( 'input_gray_8bit.tiff',
-  '63783c30b21fca4cc94bb6c02ae37df722224a466d997db39bb7ddece5e236a8');
+  '9bd950a80339e260c491025f5c58a21ca70c38e2c498914feda6558bfa1ffe35');
 
 #
 # 14) Test Reading Grayscale 8-bit + matte
@@ -124,7 +124,7 @@ testRead( 'input_gray_8bit.tiff',
 ++$test;
 print("Grayscale (8-bit + matte) ...\n");
 testRead( 'input_gray_8bit_matte.tiff',
-  'e87923c84a9140824abbb3683d603c19e8b1b08b926d78f794c5ea813db53615' );
+  'c34ac18bc2c04aa5d2577c579a620a1223e2249018ed6303cf08282f578d59c9' );
 
 #
 # 15) Test Reading Grayscale 12-bit
@@ -133,8 +133,8 @@ testRead( 'input_gray_8bit_matte.tiff',
 print("Grayscale (12-bit) ...\n");
 testRead( 'input_gray_12bit.tiff',
   'c29789db13969ddbfc9b588066d6578d87628566a60ffc33dbd43e6c4f747f51',
-  '92fd45c62bf2641e0dd33eb05d215c9c15b5c5856aaa4a758bcde6d65ea16e4f',
-  '92fd45c62bf2641e0dd33eb05d215c9c15b5c5856aaa4a758bcde6d65ea16e4f');
+  'ff6335069b6e140eb47149d847aea80bf7e2b06bd80ae9708aa382efb3ae21ee',
+  'ff6335069b6e140eb47149d847aea80bf7e2b06bd80ae9708aa382efb3ae21ee');
 
 #
 # 16) Test Reading Grayscale 16-bit
@@ -143,5 +143,5 @@ testRead( 'input_gray_12bit.tiff',
 print("Grayscale (16-bit) ...\n");
 testRead( 'input_gray_16bit.tiff',
   '7cc1f9e909cd671d0a4d32018fa885997a43de202eafdf4e0bec3dbff9f24a4e',
-  '63783c30b21fca4cc94bb6c02ae37df722224a466d997db39bb7ddece5e236a8',
-  '63783c30b21fca4cc94bb6c02ae37df722224a466d997db39bb7ddece5e236a8');
+  '9bd950a80339e260c491025f5c58a21ca70c38e2c498914feda6558bfa1ffe35',
+  '9bd950a80339e260c491025f5c58a21ca70c38e2c498914feda6558bfa1ffe35');
index 44a5b080fa385ae3c32e657f7d8b5c7680ba7d3f..0208985d4a564849bb21945560cfb97297afc16b 100644 (file)
@@ -71,7 +71,7 @@ print("Gray image (1 bit per sample) ...\n");
 testReadWrite(  'input_mono.tiff',
   'output_mono.tiff',
   q//,
-  '57fc672e7e231d3f92793d9b2073132def273f4be3115bcbed1c49a1c3131222' );
+  'c8c4f812d902693d1de6c74a6cffaaef7506bd868df65cae63b06707f2c9f3ac' );
 
 #
 # 7) Test gray 4 bit image
@@ -81,7 +81,7 @@ print("Gray image (4 bits per sample) ...\n");
 testReadWrite(  'input_gray_4bit.tiff',
   'output_gray_4bit.tiff',
   q//,
-  'a3ae7f6908bb538751f59565dd17f28f83201620ca3ccc8a87a388b3d4c50232' );
+  'be370e06f1aad47490e88b5212002c89520b07af6764690b3cee4cb9f1343df9' );
 
 #
 # 8) Test gray 8 bit image
@@ -91,7 +91,7 @@ print("Gray image (8 bits per sample) ...\n");
 testReadWrite(  'input_gray_8bit.tiff',
   'output_gray_8bit.tiff',
   q//,
-  '63783c30b21fca4cc94bb6c02ae37df722224a466d997db39bb7ddece5e236a8' );
+  '9bd950a80339e260c491025f5c58a21ca70c38e2c498914feda6558bfa1ffe35' );
 
 #
 # 9) Test gray 4 bit image (with matte channel)
@@ -101,7 +101,7 @@ print("Gray image (4 bits per sample + matte channel) ...\n");
 testReadWrite(  'input_gray_4bit_matte.tiff',
   'output_gray_4bit_matte.tiff',
   q//,
-  'be4a2a4e26725e6bfd9d55ef44cdc6f6bc0808922676ff048f3a9df55a79a26b' );
+  'b3bb4c5f125ef81e68c038fe6ff3b1cd932e759bf2555a4d4746074859d90ee3' );
 
 #
 # 10) Test gray 8 bit image (with matte channel)
@@ -111,4 +111,4 @@ print("Gray image (8 bits per sample + matte channel) ...\n");
 testReadWrite(  'input_gray_8bit_matte.tiff',
   'output_gray_8bit_matte.tiff',
   q//,
-  'e87923c84a9140824abbb3683d603c19e8b1b08b926d78f794c5ea813db53615' );
+  'c34ac18bc2c04aa5d2577c579a620a1223e2249018ed6303cf08282f578d59c9' );
index 97ffa86d410db1c58adab3ba69e2fae4e7c75abb..d672e7c9fbf15a4b9bd073a59202a3ea251e0d2e 100644 (file)
@@ -64,7 +64,7 @@ print("Flexible Image Transport System ...\n");
 testReadWrite( 'FITS:input.fits',
   'FITS:output.fits',
   q//,
-  'f28470f09857477a372a743665071cdc325613b963481d94b6dceabe292dd469' );
+  '04b3cafea6030665fbedcc3463711475bcda2ad35254e5a632d8772905f59ab9' );
 
 print("CompuServe graphics interchange format ...\n");
 ++$test;
@@ -99,14 +99,14 @@ print("Portable bitmap format (black and white), ASCII format ...\n");
 testReadWrite( 'PBM:input_p1.pbm',
   'PBM:output_p1.pbm',
   q/compression=>'None'/,
-  '57fc672e7e231d3f92793d9b2073132def273f4be3115bcbed1c49a1c3131222');
+  'c8c4f812d902693d1de6c74a6cffaaef7506bd868df65cae63b06707f2c9f3ac');
 
 print("Portable bitmap format (black and white), binary format ...\n");
 ++$test;
 testReadWrite( 'PBM:input_p4.pbm',
   'PBM:output_p4.pbm',
   q//,
-  '57fc672e7e231d3f92793d9b2073132def273f4be3115bcbed1c49a1c3131222');
+  'c8c4f812d902693d1de6c74a6cffaaef7506bd868df65cae63b06707f2c9f3ac');
 
 print("ZSoft IBM PC Paintbrush file ...\n");
 ++$test;
@@ -120,7 +120,7 @@ print("Portable graymap format (gray scale), ASCII format ...\n");
 testReadWrite( 'PGM:input_p2.pgm',
   'PGM:output_p2.pgm',
   q/compression=>'None'/,
-  'e2e1b058a09c2b9c0c696996163911dcce325def773cb2a1554c6f21a0391ff7');
+  'a52f1015dcd3290c136b892874b0ef06516d28a846a2a7383d896267a5299aba');
 
 print("Apple Macintosh QuickDraw/PICT file ...\n");
 ++$test;
@@ -141,7 +141,7 @@ print("Portable graymap format (gray scale), binary format ...\n");
 testReadWrite( 'PGM:input_p5.pgm',
   'PGM:output_p5.pgm',
   q//,
-  'e2e1b058a09c2b9c0c696996163911dcce325def773cb2a1554c6f21a0391ff7');
+  'a52f1015dcd3290c136b892874b0ef06516d28a846a2a7383d896267a5299aba');
 
 print("Portable pixmap format (color), binary format ...\n");
 ++$test;
@@ -242,7 +242,7 @@ testReadWriteSized( 'GRAY:input_70x46.gray',
   '70x46',
   8,
   q//,
-  'f28470f09857477a372a743665071cdc325613b963481d94b6dceabe292dd469' );
+  '04b3cafea6030665fbedcc3463711475bcda2ad35254e5a632d8772905f59ab9' );
 
 print("RGB format ...\n");
 ++$test;
index af5705b85bc3dbdff0a94dc4a90eb0e1eb905489..10b76febcaf001d1ed26cf8594af34f735a2d5f4 100644 (file)
@@ -1007,7 +1007,9 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
     lsb_first=1;
     image->endian=MSBEndian;
     if ((int) (*(char *) &lsb_first) != 0)
-      image->endian=LSBEndian;
+    if ((photometric == PHOTOMETRIC_MINISBLACK) ||
+        (photometric == PHOTOMETRIC_MINISWHITE))
+      image->colorspace=GRAYColorspace;
     if (photometric == PHOTOMETRIC_SEPARATED)
       image->colorspace=CMYKColorspace;
     if (photometric == PHOTOMETRIC_CIELAB)