0

I'm adjusting some brightness/contrast of tiff 6.0 images with bytes arranged in strips using imagemagick. The outputs are tiff 5.0 images with bytes in strips. I tried to force the output to tiff 6.0 format by tiffcp -t however the bytes are arranged in tiles.

Is there a way to maintain tiff 6.0 specification with strips instead of tiles or any programs/cmd that can adjust brightness/contrast while keeping the same specification?

update

imagemagick: convert test.tif -brightness-contrast 50,50 result.tif

convert-im6.q16: Unknown field with tag 37553 (0x92b1) encountered. TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/949. convert-im6.q16: Unknown field with tag 37554 (0x92b2) encountered. TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/949. convert-im6.q16: Unknown field with tag 37554 (0x92b2) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/949.

photoshop brightness:+50 contrast:+50, save in index format without compression and ICC profile

both methods yielded tiff 5.0 reflected by jhove.

tiffinfo test.tif
TIFFReadDirectory: Warning, Unknown field with tag 37553 (0x92b1) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 37554 (0x92b2) encountered.
TIFF Directory at offset 0x1d4c08 (1920008)
  Subfile Type: (0 = 0x0)
  Image Width: 1600 Image Length: 1200
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: palette color (RGB from colormap)
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 20
  Min Sample Value: 0
  Max Sample Value: 255
  Planar Configuration: single image plane
  Color Map: (present)
  Software: SPOT 4.6
  DateTime: 2018:06:11 14:30:49
  Tag 37553: 355,4014058950
  Tag 37554: 0x0,0x1,0x0,0x1,0x8,0x0,0x35,0x0,0x18,0x32,0x30,0x31,0x38,0x3a,0x30,0x36,0x3a,0x31,0x31,0x20,0x31,0x34,0x3a,0x33,0x30,0x3a,0x34,0x39,0x2e,0x30,0x33,0x30,0x0,0x0,0x9,0x0,0x4,0x0,0x0,0x0,0x1,0x0,0x4,0x0,0x8,0x0,0x0,0x0,0x0,0x5,0xf5,0xe1,0x0,0x0,0x8,0x0,0x2,0x0,0x20,0x0,0x38,0x0,0x2,0x0,0x0,0x0,0x1d,0x0,0x1,0x1,0x0,0x3c,0x0,0x8,0x0,0x0,0x1c,0xe8,0x0,0x0,0x1c,0xe8,0x0,0x14,0x0,0x1,0x1,0x0,0x2a,0x0,0x1,0x1,0x0,0x20,0x0,0x1,0x1,0x0,0x74,0x0,0x4,0x0,0x0,0x0,0x1,0x0,0x71,0x0,0x2,0x0,0x1,0x0,0x72,0x0,0x2,0x1,0x1,0x0,0x64,0x0,0x9,0x7a,0x56,0x65,0x74,0x5f,0x44,0x41,0x50,0x49,0x0,0x65,0x0,0x5,0x70,0x72,0x69,0x6e,0x74,0x0,0xc8,0x0,0x2,0x0,0x4,0x0,0xc9,0x0,0x2,0x0,0x6,0x0,0xca,0x0,0x2,0x0,0x4,0x0,0xcb,0x0,0x2,0x0,0x6,0x0,0x66,0x0,0x4,0x32,0x35,0x2e,0x34,0x0,0x67,0x0,0x6,0x32,0x35,0x34,0x30,0x38,0x36,0x0,0x3a,0x0,0x2,0x33,0x32,0x0,0x39,0x0,0x4,0x0,0x1,0x86,0xa0,0x0,0x34,0x0,0xd,0x63,0x36,0x30,0x0,0x31,0x0,0x31,0x0,0xb5,0x6d,0x0,0x31,0x0
TIFFReadDirectory: Warning, Unknown field with tag 37554 (0x92b2) encountered.
TIFF Directory at offset 0x1d5690 (1922704)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 63 Image Length: 47
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: YCbCr
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 32
  Min Sample Value: 0
  Max Sample Value: 255
  Planar Configuration: single image plane
  Reference Black/White:
     0:     0   255
     1:   128   255
     2:   128   255
  Tag 37554: 0x0,0x39,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x34,0x0,0xd,0x63,0x36,0x30,0x0,0x31,0x0,0x31,0x0,0xb5,0x6d,0x0,0x31,0x0
  JPEG Tables: (574 bytes)
tiffinfo result.tif
TIFF Directory at offset 0x57e408 (5760008)
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 1600 Image Length: 1200
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: RGB color
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 1200
  Planar Configuration: single image plane
  Page Number: 0-2
  White Point: 0.3127-0.329
  PrimaryChromaticities: 0.640000,0.330000,0.300000,0.600000,0.150000,0.060000
TIFF Directory at offset 0x5807c8 (5769160)
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 63 Image Length: 47
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: RGB color
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 47
  Planar Configuration: single image plane
  Page Number: 1-2
  White Point: 0.3127-0.329
  PrimaryChromaticities: 0.640000,0.330000,0.300000,0.600000,0.150000,0.060000

test.tif

  • Are you sure you mean tiff 5.0? The tiff 6.0 spec was published in 1992, I don't think tiff 5.0 is still used. Perhaps you mean bigtiff? In any case, imagemagick should always write a strip tiff unless you've asked it to tile. Post an example of the exact command that's failing, a sample image, and the tiffinfo output you get. – jcupitt Dec 01 '21 at 09:15
  • @jcupitt updated the post with the required info. Thanks for the help. – Marsh Randy Dec 01 '21 at 15:12
  • Hi again, the test file you've linked is a JPEG, is that correct? Your result.tif is a strip tiff, not a tiled tiff, though it does have one huge strip, which is odd. I tried with imagemagick7 and it always writes a tiff6 file, you could try updating to that. im6 and im7 both write a sensible rows/strip for me. – jcupitt Dec 01 '21 at 16:51

0 Answers0