about summary refs log tree commit diff
path: root/test/tiff-roundtrip.test
blob: 410148a532659be885d85dfabc98bcc8c8840ee6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/bash
# This script tests: pamtotiff tifftopnm
# Also requires: 

  alias pamtotiff="${PBM_TESTPREFIX}pamtotiff"
  alias tifftopnm="${PBM_TESTPREFIX}tifftopnm"
  shopt -s expand_aliases

# Failure message
## Second test fails if Netpbm was built without the flate library

pamtotiff testimg.ppm 1<>${tmpdir}/test1.tiff &&
  tifftopnm ${tmpdir}/test1.tiff | cksum

# test flate compression 
pamtotiff -flate testimg.ppm 1<>${tmpdir}/test2.tiff &&
  tifftopnm ${tmpdir}/test2.tiff | cksum

pamtotiff testgrid.pbm 1<>${tmpdir}/test3.tiff &&
  tifftopnm ${tmpdir}/test3.tiff | cksum

# test G4 compression 
pamtotiff -g4 testgrid.pbm 1<>${tmpdir}/test4.tiff &&
  tifftopnm ${tmpdir}/test4.tiff | cksum

rm ${tmpdir}/test[1234].tiff