It is currently Thu Jun 18, 2026 10:07 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Export to TIF with LZW produces a larger file
PostPosted: Tue Mar 30, 2021 3:14 pm  (#1) 
Offline
New Member

Joined: Aug 09, 2018
Posts: 2
GIMP Version: 2.10.22
Operating System: Windows
GIMP Experience: Basic Level



Windows 7 64 Bit

Input a TIF file, 564 MB.
Exporting to TIF with LZW compression produces a file of 686 MB.

Is that expansion unusual?


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Export to TIF with LZW produces a larger file
PostPosted: Wed Mar 31, 2021 3:37 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2603
Quote:
Input a TIF file, 564 MB.
Exporting to TIF with LZW compression produces a file of 686 MB.

Is that expansion unusual?


All depends ;) Tagged Image Format (TIF) is a container format and comes in several different 'flavours'. First thing is find the compression format of the original file. One way is command line ImageMagick, if a GUI is preferred, then XnViewMP can give details. In this example it is a fax format and very small file size - because it is 1 bit black & white.

Attachment:
tif.jpg
tif.jpg [ 61.08 KiB | Viewed 5441 times ]


Export from Gimp with a LZW (lossless) compression and it is bumped up to greyscale 8bit and larger file size.
Depending on how Gimp "Edit -> Preferences -> Image Import & Export" is set up an imported Image can be converted to floating point precision and even larger file size. A comparison of the same image:
The original CCITT_7.TIF size 68K
Exporting from Gimp with LZW compression CCITT_7gs.tif size 264K 8 bit greyscale.
Exporting from Gimp with LZW size 388K and precision 24 bit RGB

FWIW, (1) Find out the original format. (2) Check Gimp Import Preferences.


Top
 Post subject: Re: Export to TIF with LZW produces a larger file
PostPosted: Wed Mar 31, 2021 5:08 pm  (#3) 
Offline
New Member

Joined: Aug 09, 2018
Posts: 2
Thank you very much!
Thanks for the pointer to ImageMagick. Works nicely. I used a static Windows version, because the "dll" version got balled up.

My first thought was "C'mon, Gimp. Don't photo image file's have huge expanses of repeated bytes?"
So I read the tif file into emacs and ran "hexlify". After scrolling a few dozen pages, I gave up looking for repeated consecutive bytes. No wonder the file is incompressible.

(I produced the file with EpsonScan on an Epson V600 scanner, 4800 DPI. At the end of the file is a copyright: "Copyright (c) SEIKO EPSON CORPORATION 2000 - 2006. All rights reserved." They have a nerve.)


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group