Possible bug writing text to binary tiff

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Possible bug writing text to binary tiff

Post by fmw42 »

IM 6.9.9.31 and 7.0.7.19 Mac OSX Sierra

This works fine saving from binary tif to gif. But fails when saving to tif. Only the left half of the page is created.

convert 1719519015.tif[0] +repage -fill gray50 -pointsize 64 -draw "text 100,100 'TESTING'" watermark6.gif
convert 1719519015.tif[0] +repage -fill gray50 -pointsize 64 -draw "text 100,100 'TESTING'" watermark6.tif
magick 1719519015.tif[0] +repage -fill gray50 -pointsize 64 -draw "text 100,100 'TESTING'" watermark7.tif

Input:
http://www.fmwconcepts.com/misc_tests/b ... 519015.tif

Results:
http://www.fmwconcepts.com/misc_tests/b ... rmark6.gif
http://www.fmwconcepts.com/misc_tests/b ... rmark6.tif
http://www.fmwconcepts.com/misc_tests/b ... rmark7.tif

Code: Select all

Image: 1719519015.tif
  Base filename: 1719519015.tif
  Format: TIFF (Tagged Image File Format)
  Mime type: image/tiff
  Class: DirectClass
  Geometry: 2540x3277+0+0
  Resolution: 300x300
  Print size: 8.46667x10.9233
  Units: PixelsPerInch
  Colorspace: Gray
  Type: Bilevel
  Endianess: LSB
  Depth: 1-bit
  Channel depth:
    gray: 1-bit
  Channel statistics:
    Pixels: 8323580
    Gray:
      min: 0  (0)
      max: 1 (1)
      mean: 0.94166 (0.94166)
      standard deviation: 0.234386 (0.234386)
      kurtosis: 12.2027
      skewness: -3.76865
      entropy: 0.320821
  Colors: 2
  Histogram:
    485601: (  0,  0,  0) #000000 gray(0)
   7837979: (255,255,255) #FFFFFF gray(255)
  Rendering intent: Undefined
  Gamma: 0.454545
  Background color: gray(255)
  Border color: gray(223)
  Matte color: gray(189)
  Transparent color: gray(0)
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 2540x3277+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Group4
  Orientation: TopLeft
  Properties:
    date:create: 2018-01-06T10:26:37-08:00
    date:modify: 2018-01-06T10:25:14-08:00
    signature: beffb10a1ffce1ebcaf6c13b2d18dee3a4bb887b6ee0bf44fecb6e0fe8dd618d
    tiff:alpha: unspecified
    tiff:endian: lsb
    tiff:photometric: min-is-white
    tiff:rows-per-strip: 3277
    tiff:subfiletype: PAGE
  Artifacts:
    filename: 1719519015.tif[0]
    verbose: true
  Tainted: False
  Filesize: 166426B
  Number pixels: 8323580
  Pixels per second: 208.088MB
  User time: 0.050u
  Elapsed time: 0:01.040
  Version: ImageMagick 6.9.9-31 Q16 x86_64 2018-01-03 http://www.imagemagick.org

P.S. It works fine if I re-add -compress Group4 in the command lines.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible bug writing text to binary tiff

Post by magick »

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.
Post Reply