]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 22 Apr 2010 14:50:53 +0000 (14:50 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 22 Apr 2010 14:50:53 +0000 (14:50 +0000)
ChangeLog
coders/tiff.c

index 7c216f3db67a404ae4ac1aaf9557ac146017304f..a1749d1964bd517c38a40675708787de04b20445 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,10 @@
     expensive operation.
   * Match on literal after backslash in glob expression (reference
     http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16068).
+  * Enable JPEG-compression for grayscale TIFF images (reference
+    http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16064).
+  * Don't write empty tile if tile geometry matches the image width (reference
+    http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16064).
 
 2010-04-15  6.6.1-4 Cristy  <quetzlzacatenango@image...>
   * Do not set the resample virtual pixel method when undefined.
index 3e455023ef681608fc9c9994fb8df4e5e1d172f5..b5fa1d50ce1b2507d05e14db2ab1bd5f3f74739c 100644 (file)
@@ -2184,10 +2184,11 @@ static int32 TIFFWritePixels(TIFF *tiff,TIFFInfo *tiff_info,long row,
         for (l=0; l < bytes_per_pixel; l++)
           *q++=(*p++);
       }
-    status=TIFFWriteTile(tiff,tiff_info->pixels,(uint32) (i*
-      tiff_info->tile_geometry.width),(uint32) ((row/
-      tiff_info->tile_geometry.height)*tiff_info->tile_geometry.height),0,
-      sample);
+    if ((i*tiff_info->tile_geometry.width) != image->columns)
+      status=TIFFWriteTile(tiff,tiff_info->pixels,(uint32) (i*
+        tiff_info->tile_geometry.width),(uint32) ((row/
+        tiff_info->tile_geometry.height)*tiff_info->tile_geometry.height),0,
+        sample);
     if (status < 0)
       break;
   }
@@ -2680,22 +2681,19 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info,
     image->endian=MSBEndian;
     if ((int) (*(char *) &lsb_first) != 0)
       image->endian=LSBEndian;
-    if ((compress_tag == COMPRESSION_JPEG) && (photometric != PHOTOMETRIC_RGB))
-      compress_tag=COMPRESSION_NONE;
+    if ((compress_tag == COMPRESSION_CCITTFAX3) &&
+        (photometric != PHOTOMETRIC_MINISWHITE))
+      {
+        compress_tag=COMPRESSION_NONE;
+        endian=FILLORDER_MSB2LSB;
+      }
     else
-      if ((compress_tag == COMPRESSION_CCITTFAX3) &&
-          (photometric != PHOTOMETRIC_MINISWHITE))
-        {
-          compress_tag=COMPRESSION_NONE;
-          endian=FILLORDER_MSB2LSB;
-        }
-      else
-        if ((compress_tag == COMPRESSION_CCITTFAX4) &&
-           (photometric != PHOTOMETRIC_MINISWHITE))
-         {
-           compress_tag=COMPRESSION_NONE;
-           endian=FILLORDER_MSB2LSB;
-         }
+      if ((compress_tag == COMPRESSION_CCITTFAX4) &&
+         (photometric != PHOTOMETRIC_MINISWHITE))
+       {
+         compress_tag=COMPRESSION_NONE;
+         endian=FILLORDER_MSB2LSB;
+       }
     (void) TIFFSetField(tiff,TIFFTAG_COMPRESSION,compress_tag);
     (void) TIFFSetField(tiff,TIFFTAG_FILLORDER,endian);
     (void) TIFFSetField(tiff,TIFFTAG_BITSPERSAMPLE,quantum_info->depth);