Page 1 of 1

possible bug loss of lzw compression for tiff in convert

Posted: 2014-01-15T21:08:14-07:00
by fmw42
This is a follow up of viewtopic.php?f=3&t=24647#p106920 and the input image is linked there.

The issue is the following. When doing a convert in IM 6.8.7.4 and prior, the LZW compression is carried over to the output. However, starting with IM 6.8.7.5 up to 6.8.8.2, the output has compression none. I do not know if this was intentional or not. I just wanted to verify the user's complaint.

im6874 convert test.tiff test_6874.tiff
compression: LZW

im6875 convert test.tiff test_6876.tiff
compression: none



The input file is an 8/1-bit, grayscale tiff with LZW compression.

Code: Select all

  Format: TIFF (Tagged Image File Format)
  Mime type: image/tiff
  Class: DirectClass
  Geometry: 3952x5799+0+0
  Units: PixelsPerInch
  Type: Bilevel
  Base type: Bilevel
  Endianess: MSB
  Colorspace: Gray
  Depth: 8/1-bit
  Channel depth:
    gray: 1-bit
    alpha: 1-bit
  Channel statistics:
    Gray:
      min: 0 (0)
      max: 255 (1)
      mean: 240.291 (0.942317)
      standard deviation: 59.4516 (0.233143)
      kurtosis: 12.3973
      skewness: -3.79437
    Alpha:
      min: 255 (1)
      max: 255 (1)
      mean: 255 (1)
      standard deviation: 0 (0)
      kurtosis: 0
      skewness: 0
  Colors: 2
  Histogram:
   1321964: (  0,  0,  0,255) #000000 graya(0,1)
  21595684: (255,255,255,255) #FFFFFF graya(255,1)
  Rendering intent: Undefined
  Gamma: 0.454545
  Background color: graya(255,1)
  Border color: graya(223,1)
  Matte color: graya(189,1)
  Transparent color: graya(0,0)
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 3952x5799+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: LZW
  Orientation: TopLeft
  Properties:
    date:create: 2014-01-15T16:00:50-08:00
    date:modify: 2014-01-15T16:00:50-08:00
    signature: d13f267488702005c20d0ecf85df08942dcfeb5ac4e88d16efbdb5fcb02665a6
    tiff:alpha: unassociated
    tiff:endian: msb
    tiff:photometric: min-is-black
    tiff:rows-per-strip: 16
  Artifacts:
    filename: test.tiff
    verbose: true
  Tainted: True
  Filesize: 566KB
  Number pixels: 22.92M
  Pixels per second: 57.29MB
  User time: 0.400u
  Elapsed time: 0:01.400
  Version: ImageMagick 6.8.8-2 Q16 x86_64 2014-01-13 http://www.imagemagick.org

Re: possible bug loss of lzw compression for tiff in convert

Posted: 2014-05-15T04:07:22-07:00
by dlemstra
I just committed a patch for this that only make sure that jpeg compression is not used when converting jpeg to tiff. The next release of ImageMagick (6.8.9-2) will include this fix.