Windows 10 64-bit machine
I am resizing Gray TIFF files in a Windows batch file. Relevant input file properties BEFORE any processing:
Code: Select all
magick identify -verbose -quiet test.tif
...
Format: TIFF
Colorspace: Gray
Type: Grayscale
Gamma: 0.454545
Properties:
icc:copyright: Copyright 1999 Adobe Systems Incorporated
icc:description: Gray Gamma 2.2
icc:manufacturer: Gray Gamma 2.2
icc:model: Gray Gamma 2.2
photoshop:ColorMode: 1
photoshop:ICCProfile: Gray Gamma 2.2
Profiles:
Profile-8bim: 11078 bytes
Profile-icc: 408 bytes
Profile-xmp: 16909 bytes
Code: Select all
magick -quiet "%~1" -filter Quadratic -colorspace LinearGray -distort Resize 10800 -colorspace Gray ...
Code: Select all
icc:copyright: Copyright 1999 Adobe Systems Incorporated
icc:description: Gray Gamma 2.2
icc:manufacturer: Gray Gamma 2.2
icc:model: Gray Gamma 2.2
Profile-icc: 408 bytes
Out of curiosity, I tried using -gamma instead of -colorspace as follows:
Code: Select all
magick -quiet "%~1" -filter Quadratic -gamma 0.454545 -distort Resize 10800 -gamma 2.2 ...
Given that "-colorspace" is the preferred way to convert to linear light and back for resize operations, how can it be done and preserve the profile data in TIFF files?
Thanks,
Dave