The Computer Oracle

Determining the image compression algorithm used on TIFF images

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 5 Looping

--

Chapters
00:00 Determining The Image Compression Algorithm Used On Tiff Images
00:31 Accepted Answer Score 17
00:50 Answer 2 Score 4
01:12 Answer 3 Score 2
01:24 Answer 4 Score 1
01:42 Answer 5 Score 1
01:54 Thank you

--

Full question
https://superuser.com/questions/402829/d...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#images

#avk47



ACCEPTED ANSWER

Score 17


Use W_Whalley's identify -verbose suggestion instead. If you're in a linux/cygwin environment, pipe it to grep -i compression and you'll have your one-line answer. I.e.

identify -verbose /path/to/your/file.tiff | grep -i compression



ANSWER 2

Score 4


If you have ImageMagick installed, use the display tool to show the image.

Right-click on the image and choose Image Info, then look for the Compression: setting (it's near the bottom of the list).

Or if you want the minimum information use the identify tool with the -verbose switch, then filter the result to look for the “Compression” line.




ANSWER 3

Score 2


What about the file command? Example:

$ file /usr/share/apache2/icons/a.png
/usr/share/apache2/icons/a.png: PNG image, 20 x 22, 4-bit colormap, non-interlaced



ANSWER 4

Score 1


identify works, but it's slow for big files.

identify -verbose

One may use tiffinfo instead.

tiffinfo test.tif | grep Compression

Use this command for installation (on Ubuntu):

apt-get install libtiff-tools



ANSWER 5

Score 1


Another option would be exiftool. For example:

exiftool -compression  eudem_dem_3035_europe.tif
> Compression                     : Adobe Deflate

exiftool -compression CLMS_CLCplus_RASTER_2018_010m_eu_03035_V1_1.tif
> Compression                     : LZW