Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Post by snibgo »

stupid_shinji wrote:There is already an observable discrepancy with the provided info ...
Is there? "MiB" means "binary million bytes" and "MB" probably means "decimal million bytes".

296.483 * 1.024 * 1.024 = 310.884958208

So, one version of a file is 222.5MiB, and another version is 111.284MiB. They are both 8 bits/channel/pixel. Does "compare" say the pixels are identical. Does identify say they have the same compression?
snibgo's IM pages: im.snibgo.com
stupid_shinji
Posts: 13
Joined: 2018-04-26T09:37:06-07:00
Authentication code: 1152

Re: Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Post by stupid_shinji »

snibgo,

Yes, I see how that is correct. I'm a layperson so wasn't aware of that before.

"Compare" doesn't do anything for me. The number of pixels is similar. fmw42 was right in that the image is lacking compression. It becomes uncompressed when working with IM and then needs to be compressed again. fmw42 wrote

"When you start are your TIFFs 24-bit color or 8-bit color (or grayscale)? If you start with 8-bit color and resize that will add more colors and you will get a 24-bit color result. If you want to keep the 8-bit color, then you need add -type palette to your processing command to keep the result at 8-bits color." This makes sense to me however, my supervisor doesn't want me using LZW compression (I personally am not against it at all). Also -type palette didn't get the results I needed.

Below is the verbose. I checked compression and it said none for all of them. Also, why do the IM processed files read as 208036.tif[0] and 208036.tif[1]?

identify -verbose 208036.tif 208036_PS_Save_As.tif
Image: 208036.tif
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 4800x7200+0+0
Resolution: 300x300
Print size: 16x24
Units: PixelsPerInch
Type: TrueColor
Base type: TrueColor
Endianess: LSB
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Pixels: 34560000
Red:
min: 0 (0)
max: 255 (1)
mean: 91.1812 (0.357573)
standard deviation: 66.7167 (0.261634)
kurtosis: -0.792183
skewness: 0.605214
entropy: 0.970427
Green:
min: 0 (0)
max: 255 (1)
mean: 89.6923 (0.351734)
standard deviation: 62.8365 (0.246418)
kurtosis: -0.747872
skewness: 0.583969
entropy: 0.966353
Blue:
min: 0 (0)
max: 255 (1)
mean: 80.8748 (0.317156)
standard deviation: 62.8572 (0.246499)
kurtosis: -0.516573
skewness: 0.695293
entropy: 0.958516
Image statistics:
Overall:
min: 255 (1)
max: 0 (0)
mean: 167.751 (0.657845)
standard deviation: 64.3237 (0.25225)
kurtosis: -0.683318
skewness: 0.62997
entropy: 0.965098
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: white
Border color: srgb(223,223,223)
Matte color: grey74
Transparent color: black
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 4800x7200+0+0
Dispose: Undefined
Iterations: 0
Scene: 0 of 2
Compression: None
Orientation: TopLeft
Properties:
date:create: 2018-05-01T16:58:23-05:00
date:modify: 2018-05-01T11:45:47-05:00
icc:copyright: Copyright 2000 Adobe Systems Incorporated
icc:description: Adobe RGB (1998)
icc:manufacturer: Adobe RGB (1998)
icc:model: Adobe RGB (1998)
signature: d01151fac2c62ef6e5e35adf86cc6befcd3884a83918fcbefa86a613cfe9a195
tiff:alpha: unspecified
tiff:endian: lsb
tiff:photometric: RGB
tiff:rows-per-strip: 1
tiff:subfiletype: PAGE
Profiles:
Profile-icc: 560 bytes
Profile-iptc: 104 bytes
City[1,90]: 0x00000000: 254700 -%
unknown[2,0]:
Created Date[2,55]: 20171026
Created Time[2,60]: 050307
unknown[2,62]: 20171026
unknown[2,63]: 050307
Headline[2,105]: N Carolina 10 28 2017 Blue Ridge
Profile-xmp: 5259 bytes
Artifacts:
filename: 208036.tif
verbose: true
Tainted: False
Filesize: 198.069MiB
Number pixels: 34560000
Pixels per second: 59.5862MB
User time: 0.570u
Elapsed time: 0:01.579
Version: ImageMagick 6.9.9-26 Q16 x86_64 2018-04-11 http://www.imagemagick.org
Image: 208036.tif
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 4815x7200+0+0
Resolution: 300x300
Print size: 16.05x24
Units: PixelsPerInch
Type: TrueColor
Base type: TrueColor
Endianess: LSB
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Pixels: 34668000
Red:
min: 6 (0.0235294)
max: 247 (0.968627)
mean: 98.6572 (0.386891)
standard deviation: 48.6146 (0.190646)
kurtosis: -0.975464
skewness: 0.30131
entropy: 0.946593
Green:
min: 8 (0.0313725)
max: 229 (0.898039)
mean: 95.945 (0.376255)
standard deviation: 41.0062 (0.160808)
kurtosis: -0.76288
skewness: 0.348861
entropy: 0.936663
Blue:
min: 3 (0.0117647)
max: 255 (1)
mean: 83.1175 (0.325951)
standard deviation: 42.3573 (0.166107)
kurtosis: -0.22335
skewness: 0.584233
entropy: 0.91902
Image statistics:
Overall:
min: 252 (0.988235)
max: 0 (0)
mean: 162.427 (0.636968)
standard deviation: 44.6349 (0.175039)
kurtosis: -0.676196
skewness: 0.418858
entropy: 0.934092
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: white
Border color: srgb(223,223,223)
Matte color: grey74
Transparent color: black
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 4815x7200+0+0
Dispose: Undefined
Iterations: 0
Scene: 1 of 2
Compression: None
Orientation: TopLeft
Properties:
date:create: 2018-05-01T16:58:23-05:00
date:modify: 2018-05-01T11:45:47-05:00
signature: 74ee075829173c13ac997db5e8a49dab8633d9aa33c17d786430335edc2373d0
tiff:alpha: unspecified
tiff:endian: lsb
tiff:photometric: RGB
tiff:rows-per-strip: 1
tiff:subfiletype: PAGE
Artifacts:
filename: 208036.tif
verbose: true
Tainted: False
Filesize: 198.069MiB
Number pixels: 34668000
Pixels per second: 10.5374MB
User time: 3.300u
Elapsed time: 0:04.289
Version: ImageMagick 6.9.9-26 Q16 x86_64 2018-04-11 http://www.imagemagick.org
Image: 208036_PS_Save_As.tif
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 4800x7200+0+0
Resolution: 300x300
Print size: 16x24
Units: PixelsPerInch
Type: TrueColor
Base type: TrueColor
Endianess: LSB
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Pixels: 34560000
Red:
min: 0 (0)
max: 255 (1)
mean: 91.1812 (0.357573)
standard deviation: 66.7167 (0.261634)
kurtosis: -0.792183
skewness: 0.605214
entropy: 0.970427
Green:
min: 0 (0)
max: 255 (1)
mean: 89.6923 (0.351734)
standard deviation: 62.8365 (0.246418)
kurtosis: -0.747872
skewness: 0.583969
entropy: 0.966353
Blue:
min: 0 (0)
max: 255 (1)
mean: 80.8748 (0.317156)
standard deviation: 62.8572 (0.246499)
kurtosis: -0.516573
skewness: 0.695293
entropy: 0.958516
Image statistics:
Overall:
min: 255 (1)
max: 0 (0)
mean: 167.751 (0.657845)
standard deviation: 64.3237 (0.25225)
kurtosis: -0.683318
skewness: 0.62997
entropy: 0.965098
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: white
Border color: srgb(223,223,223)
Matte color: grey74
Transparent color: black
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 4800x7200+0+0
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Properties:
aux:Firmware: IQ3 100MP Trichr, User Firmware: 5.09.49
aux:ImageNumber: 2891
aux:Lens: Schneider Kreuznach LS 35mm LS f/3.5
aux:LensInfo: 35/1 35/1 32/1 5807267/1659219
aux:SerialNumber: HP001053
date:create: 2018-05-01T17:14:31-05:00
date:modify: 2018-05-01T17:14:30-05:00
dc:format: image/tiff
exif:PixelXDimension: 4800
exif:PixelYDimension: 7200
icc:copyright: Copyright 2000 Adobe Systems Incorporated
icc:description: Adobe RGB (1998)
icc:manufacturer: Adobe RGB (1998)
icc:model: Adobe RGB (1998)
photoshop:ColorMode: 3
photoshop:DateCreated: 2017-10-26T05:03:07
photoshop:Headline: N Carolina 10 28 2017 Blue Ridge
photoshop:ICCProfile: Adobe RGB (1998)
photoshop:LegacyIPTCDigest: EEFC2F9B2A1527E5AD3702DA839EEDF8
signature: d01151fac2c62ef6e5e35adf86cc6befcd3884a83918fcbefa86a613cfe9a195
tiff:alpha: unspecified
tiff:endian: lsb
tiff:make: Phase One
tiff:model: IQ3 100MP Trichr
tiff:photometric: RGB
tiff:rows-per-strip: 1
tiff:software: Adobe Photoshop CC 2018 (Macintosh)
tiff:timestamp: 2018:05:01 17:14:29
xmp:CreateDate: 2017-10-26T05:03:07
xmp:CreatorTool: Capture One 11 Macintosh
xmp:MetadataDate: 2018-05-01T17:14:29-05:00
xmp:ModifyDate: 2018-05-01T17:14:29-05:00
xmpMM:DocumentID: adobe:docid:photoshop:5a9aa4de-8e44-4f4c-b72d-1603b79cebe6
xmpMM:InstanceID: xmp.iid:90f3f2b5-1b1e-4040-bdb7-476f3a9d4402
xmpMM:OriginalDocumentID: xmp.did:4153812c-4b24-443f-98ca-acf13b627a36
Profiles:
Profile-8bim: 12082 bytes
Profile-icc: 560 bytes
Profile-xmp: 15057 bytes
Artifacts:
filename: 208036_PS_Save_As.tif
verbose: true
Tainted: False
Filesize: 98.9039MiB
Number pixels: 34560000
Pixels per second: 115.2MB
User time: 0.300u
Elapsed time: 0:01.300
Version: ImageMagick 6.9.9-26 Q16 x86_64 2018-04-11 http://www.imagemagick.org
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Post by snibgo »

stupid_shinji wrote:Also, why do the IM processed files read as 208036.tif[0] and 208036.tif[1]?
The file contains two images.

I'm getting confused. When you have two images of the same size in one TIFF file, the file size is 222 MiB. When you open one of those images in Photoshop and save just that image in a file, the filesize is 111 MiB, half of what it was with two images.

Is that right?
snibgo's IM pages: im.snibgo.com
stupid_shinji
Posts: 13
Joined: 2018-04-26T09:37:06-07:00
Authentication code: 1152

Re: Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Post by stupid_shinji »

snibgo,

Yes what you said is true. It is strange, isn't it?

Thank you for all of your help.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Post by snibgo »

What is strange? That your input files contain two images? You haven't said where they came from. How many images would you expect? Perhaps there is a bug in whatever made them.
snibgo's IM pages: im.snibgo.com
stupid_shinji
Posts: 13
Joined: 2018-04-26T09:37:06-07:00
Authentication code: 1152

Re: Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Post by stupid_shinji »

Snibgo,

I've specified that they were processed in Capture One 11 from IIQ RAWs into TIFF 8 bit Uncompressed Adobe RGB (1998) 300ppi Scale Fixed 100%.

And it wouldn't surprise me as Phase One/Capture One is buggy as stuff and they take steps to make everything propriety on arbitrary grounds.

I tried it before with LZW compression and it seemed to get me closer to the results my employer needs. I can try that again and send you the documentation of that as well. Also, I checked and in the source folder there are only 3 files but after typing identify it is saying there are 6 images with the same [0][1] scheme. These images haven't been changed by IM in any way.

Kiosk-1065:00_Alternates kiosk1059$ identify 208029.tif 208036.tif 208056.tif
208029.tif[0] TIFF 8778x11803 8778x11803+0+0 8-bit sRGB 296.483MiB 0.010u 0:00.009
208029.tif[1] TIFF 119x160 119x160+0+0 8-bit sRGB 296.483MiB 0.010u 0:00.000
208036.tif[0] TIFF 7890x11835 7890x11835+0+0 8-bit sRGB 267.213MiB 0.000u 0:00.009
208036.tif[1] TIFF 107x160 107x160+0+0 8-bit sRGB 267.213MiB 0.000u 0:00.000
208056.tif[0] TIFF 8708x11608 8708x11608+0+0 8-bit sRGB 289.261MiB 0.010u 0:00.019
208056.tif[1] TIFF 120x160 120x160+0+0 8-bit sRGB 289.261MiB 0.000u 0:00.000
identify: Wrong data type 3 for "PixelXDimension"; tag ignored. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Wrong data type 3 for "PixelYDimension"; tag ignored. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Incompatible type for "FileSource"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
identify: Incompatible type for "SceneType"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
identify: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Unknown field with tag 42034 (0xa432) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Unknown field with tag 42036 (0xa434) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Wrong data type 3 for "PixelXDimension"; tag ignored. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Wrong data type 3 for "PixelYDimension"; tag ignored. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Incompatible type for "FileSource"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
identify: Incompatible type for "SceneType"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
identify: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Unknown field with tag 42034 (0xa432) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Unknown field with tag 42036 (0xa434) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Wrong data type 3 for "PixelXDimension"; tag ignored. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Wrong data type 3 for "PixelYDimension"; tag ignored. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Incompatible type for "FileSource"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
identify: Incompatible type for "SceneType"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/912.
identify: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Unknown field with tag 42034 (0xa432) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
identify: Unknown field with tag 42036 (0xa434) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/912.
Kiosk-1065:00_Alternates kiosk1059$
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Post by snibgo »

stupid_shinji wrote:208029.tif[0] TIFF 8778x11803 8778x11803+0+0 8-bit sRGB 296.483MiB 0.010u 0:00.009
208029.tif[1] TIFF 119x160 119x160+0+0 8-bit sRGB 296.483MiB 0.010u 0:00.000
You can see these are very different sizes. I suspect the second is a thumbnail version of the first. Perhaps you resize this file (containing two images), so both images end up about the same size. But the second probably looks horrible because it has been enlarged so much.
snibgo's IM pages: im.snibgo.com
stupid_shinji
Posts: 13
Joined: 2018-04-26T09:37:06-07:00
Authentication code: 1152

Re: Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Post by stupid_shinji »

snibgo,

That makes sense. I had the same idea. I looked and didn't see the "Create thumbnails on save" box checked but can have another go at it. I'll try a few things and show you the documentation later.
stupid_shinji
Posts: 13
Joined: 2018-04-26T09:37:06-07:00
Authentication code: 1152

Re: Discrepancy in File Size reading between Photoshop and OS+ImageMagick

Post by stupid_shinji »

snibgo,

This may be premature but I think you are right. In Capture One under the Process Recipe tool and under "Options" "Uncompressed, LZW, Zip, No Thumbnail, Tile Dimensions" are selectable. I had " Uncompressed" selected but after selecting "Uncompressed, No Thumbnail" it no longer identifies two images in one file e.g [0] [1] but as one. One small change in settings needed to be done.

I apologize for all the trouble and would like to thank fmw42 for the help as well. I did the resizing with IM and no longer had the file read size discrepancies between the finder and Photoshop.

Thank you all.

Identify with the files that were processed with only "Uncompressed"
CF000602.tif[0] TIFF 11608x8708 11608x8708+0+0 8-bit sRGB 289.261MiB 0.010u 0:00.019
CF000602.tif[1] TIFF 160x120 160x120+0+0 8-bit sRGB 289.261MiB 0.000u 0:00.000
CF000604.tif[0] TIFF 11608x8708 11608x8708+0+0 8-bit sRGB 289.261MiB 0.000u 0:00.009
CF000604.tif[1] TIFF 160x120 160x120+0+0 8-bit sRGB 289.261MiB 0.010u 0:00.000
CF000708.tif[0] TIFF 11608x8708 11608x8708+0+0 8-bit sRGB 289.261MiB 0.010u 0:00.009
CF000708.tif[1] TIFF 160x120 160x120+0+0 8-bit sRGB 289.261MiB 0.000u 0:00.000

Identify with files that were processed with "Uncompressed, No Thumbnail"
CF000602.tif TIFF 11608x8708 11608x8708+0+0 8-bit sRGB 289.206MiB 0.000u 0:00.019
CF000604.tif TIFF 11608x8708 11608x8708+0+0 8-bit sRGB 289.206MiB 0.010u 0:00.009
CF000708.tif TIFF 11608x8708 11608x8708+0+0 8-bit sRGB 289.206MiB 0.010u 0:00.009

Identify after Resizing
CF000602.tif TIFF 7200x5401 7200x5401+0+0 8-bit sRGB 111.263MiB 0.000u 0:00.000
CF000604.tif TIFF 7200x5401 7200x5401+0+0 8-bit sRGB 111.263MiB 0.000u 0:00.000
CF000708.tif TIFF 7200x5401 7200x5401+0+0 8-bit sRGB 111.263MiB 0.010u 0:00.000

In the Finder, these preceding images all read as 116.7mb.

Thank you so much again.
Post Reply