RSS/Atom feed Twitter
Site is read-only, email is disabled

Use of tifftopnm and pnmtotiff to strip images -- ?? meaning of

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Use of tifftopnm and pnmtotiff to strip images -- ?? meaning of Jay Smith 10 Mar 05:19
  Use of tifftopnm and pnmtotiff to strip images -- ?? meaning of Sven Neumann 11 Mar 08:57
Jay Smith
2010-03-10 05:19:22 UTC (almost 15 years ago)

Use of tifftopnm and pnmtotiff to strip images -- ?? meaning of

I hope it's okay to ask this here.

The use of tifftopnm and pnmtotiff was suggested in an earlier thread about stripping color profiles from TIFF images.

Below I show tiffinfo before and after processing, as well as the tifftopnm and the pnmtotiff processes.

?? On the pnmtotiff, it said:

pnmtotiff: computing colormap... pnmtotiff: Too many colors - proceeding to write a 24-bit RGB file. pnmtotiff: If you want an 8-bit palette file, try doing a 'ppmquant 256'.

What does this mean.... Too many colors??

And of what significance might this be to me? I was previously told that this process clips colors but that Gimp does too so there would really be about the same result. What I don't understand is what colors it is getting rid of. (When I look at the before and after images, they look the same to me.)

?? This process also got rid of the "Photoshop Data" in this old file. I have no idea what that extra data was. Any idea what Photoshop might have added -- I don't put comments into my images. Does it leave empty space for comments even though you did not use comments?

The process did cut the file size from 2,850,625 to 2,844,590 which change is LESS than the total of the ICC Profile and the Photoshop Data that were present in the original. It got rid of them, but did not quite reclaim all the space.

========== tiffinfo BEFORE processing

#: /q/images/jsa/source$ tiffinfo 00*tif 0001a_1st-issue_110001.tif: Warning, incorrect count for field "MinSampleValue" (1, expecting 3); tag ignored. 0001a_1st-issue_110001.tif: Warning, incorrect count for field "MaxSampleValue" (1, expecting 3); tag ignored. TIFF Directory at offset 0x8 (8)
Subfile Type: (0 = 0x0)
Image Width: 877 Image Length: 1080 Resolution: 300, 300 pixels/inch
Bits/Sample: 8
Compression Scheme: None
Photometric Interpretation: RGB color Samples/Pixel: 3
Rows/Strip: 1080
Planar Configuration: single image plane Photoshop Data: , 5748 bytes
ICC Profile: , 3144 bytes

========== tifftopnm

#: /q/images/jsa/source$ tifftopnm 0001* > stuff.pnm 0001a_1st-issue_110001.tif: Warning, incorrect count for field "MinSampleValue" (1, expecting 3); tag ignored. 0001a_1st-issue_110001.tif: Warning, incorrect count for field "MaxSampleValue" (1, expecting 3); tag ignored. tifftopnm: writing PPM file

=========== pnnmtotiff

#: /q/images/jsa/source$ pnmtotiff stuff.pnm > stuff-after-pnm.tif pnmtotiff: computing colormap...
pnmtotiff: Too many colors - proceeding to write a 24-bit RGB file. pnmtotiff: If you want an 8-bit palette file, try doing a 'ppmquant 256'.

========== tiffinfo AFTER processing

#: /q/images/jsa/source$ tiffinfo stuff*tif TIFF Directory at offset 0x2b5b90 (2841488) Image Width: 877 Image Length: 1080 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: 3
Planar Configuration: single image plane DocumentName: stuff.pnm
ImageDescription: converted PNM file

Sven Neumann
2010-03-11 08:57:48 UTC (almost 15 years ago)

Use of tifftopnm and pnmtotiff to strip images -- ?? meaning of

Hi,

On Tue, 2010-03-09 at 23:19 -0500, Jay Smith wrote:

?? On the pnmtotiff, it said:

pnmtotiff: computing colormap... pnmtotiff: Too many colors - proceeding to write a 24-bit RGB file. pnmtotiff: If you want an 8-bit palette file, try doing a 'ppmquant 256'.

What does this mean.... Too many colors??

There are too many colors (more than 256) to create a file with an indexed palette. So the tool decides to create a true-color RGB file instead.

The process did cut the file size from 2,850,625 to 2,844,590 which change is LESS than the total of the ICC Profile and the Photoshop Data that were present in the original. It got rid of them, but did not quite reclaim all the space.

If you look carefully you will notice that new information has been added, such as a DocumentName and an ImageDescription. If you really care about file-size, perhaps you should use compression in your TIFF files. Uncompressed TIFF files are huge, obviously.

Sven