tiff images // tiff:photometric: min-is-white // causes pixel values to be inverted ( using latest release // 6.5.4-10 2009-08-10 )

Scott Callaway <[email protected]> Wed, 19 Aug 2009 02:28:19 -0400
Newsgroups gmane.comp.video.image-magick.bugs
Message-ID <[email protected]>
It appears that when the ' tiff:photometric: min-is-white' is set in 8bit or 16bit tiff images, the pixels values are inverted.  It is my understanding that 'min-is-white' is only a visualization setting and should not affect the actual pixel values.

If I use ImageMagick 6.3.6, the pixel values are not flipped when the 'min-is-white' flag is set.

I am sending two 8bit images that can be used to reproduce this issue ( 17k each).  The only difference between the two images is the 'inverted LUT' setting.  NOTE: ImageJ does not invert the pixel values; ImageJ only inverts the LUT for visualization.  If you subtract these two images in ImageJ, you will get an all zero image.


Regards,  Scott

###############   identify.exe  traces are listed below for refernce

C:\ImageMagick-6.5.4\VisualMagick\bin>identify.exe -verbose c:\8bitgrayscale_130x130_.tif
Image: c:\8bitgrayscale_130x130_.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 130x130+0+0
  Resolution: 72x72
  Print size: 1.80556x1.80556
  Units: PixelsPerInch
  Type: Grayscale
  Base type: Grayscale
  Endianess: MSB
  Colorspace: RGB
  Depth: 8-bit
  Channel depth:
    gray: 8-bit
  Channel statistics:
    gray:
      min: 38 (0.14902)
      max: 204 (0.8)
      mean: 181.21 (0.710628)
      standard deviation: 18.1094 (0.0710173)
      kurtosis: 16.5343
      skewness: -3.74485
  Histogram:
        55: (167,167,167) #A7A7A7 rgb(167,167,167)
        59: (168,168,168) #A8A8A8 grey66

(deleted some values here )
        45: (165,165,165) #A5A5A5 rgb(165,165,165)
        45: (166,166,166) #A6A6A6 grey65
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Page geometry: 130x130+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: None
  Orientation: TopLeft
  Properties:
    comment: ImageJ=1.41o

    date:create: 2009-08-18T22:52:59-07:00
    date:modify: 2009-08-18T22:52:59-07:00
    signature: a67f6082f77745da1213e6b3c2fb164823c3c83c09070d65c7bbcebe90dc54e2
    tiff:photometric: min-is-black  ( Seems like it is this setting; when 'min-is-white' is set - pixel values invert )
    tiff:rows-per-strip: 63
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 16.6kb
  Number pixels: 16.5kb
  Version: ImageMagick 6.5.4-10 2009-08-10 Q32 http://www.imagemagick.org


##################################################################

C:\ImageMagick-6.5.4\VisualMagick\bin>identify.exe -verbose c:\8bitgrayscale_130x130_Inverted_LUT.tif
Image: c:\8bitgrayscale_130x130_Inverted_LUT.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 130x130+0+0
  Resolution: 72x72
  Print size: 1.80556x1.80556
  Units: PixelsPerInch
  Type: Grayscale
  Base type: Grayscale
  Endianess: MSB
  Colorspace: RGB
  Depth: 8-bit
  Channel depth:
    gray: 8-bit
  Channel statistics:
    gray:
      min: 51 (0.2)
      max: 217 (0.85098)
      mean: 73.7898 (0.289372)
      standard deviation: 18.1094 (0.0710173)
      kurtosis: 16.5343
      skewness: 3.74485
  Histogram:
         1: (179,179,179) #B3B3B3 grey70
         6: (180,180,180) #B4B4B4 rgb(180,180,180)
         4: (181,181,181) #B5B5B5 grey71
         6: (182,182,182) #B6B6B6 rgb(182,182,182)

(deleted some values here )
         4: (177,177,177) #B1B1B1 rgb(177,177,177)
         5: (178,178,178) #B2B2B2 rgb(178,178,178)
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Page geometry: 130x130+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: None
  Orientation: TopLeft
  Properties:
    comment: ImageJ=1.41o

    date:create: 2009-08-18T22:52:47-07:00
    date:modify: 2009-08-18T22:52:47-07:00
    signature: ccd2774f4b7371b22304290f65a35b8755cf29c4b9868082582e2ff4a296148e
    tiff:photometric: min-is-white   ( Seems like it is this setting; when 'min-is-white' is set - pixel values invert )
    tiff:rows-per-strip: 63
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 16.6kb
  Number pixels: 16.5kb
  Version: ImageMagick 6.5.4-10 2009-08-10 Q32 http://www.imagemagick.org

_______________________________________________
Magick-bugs mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-bugs