~ubuntu-branches/ubuntu/oneiric/tiff/oneiric

« back to all changes in this revision

Viewing changes to contrib/tags/listtif.c

  • Committer: Bazaar Package Importer
  • Author(s): Jay Berkenbilt
  • Date: 2009-08-28 15:44:23 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090828154423-7oisj77n302jrroa
Tags: 3.9.1-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * listtif.c -- lists a tiff file.
 
3
 */
 
4
 
 
5
#include "xtiffio.h"
 
6
#include <stdlib.h>
 
7
 
 
8
void main(int argc,char *argv[])
 
9
{
 
10
        char *fname="newtif.tif";
 
11
        int flags;
 
12
 
 
13
        TIFF *tif=(TIFF*)0;  /* TIFF-level descriptor */
 
14
 
 
15
        if (argc>1) fname=argv[1];
 
16
        
 
17
        tif=XTIFFOpen(fname,"r");
 
18
        if (!tif) goto failure;
 
19
        
 
20
        /* We want the double array listed */
 
21
        flags = TIFFPRINT_MYMULTIDOUBLES;
 
22
        
 
23
        TIFFPrintDirectory(tif,stdout,flags);
 
24
        XTIFFClose(tif);
 
25
        exit (0);
 
26
        
 
27
failure:
 
28
        printf("failure in listtif\n");
 
29
        if (tif) XTIFFClose(tif);
 
30
        exit (-1);
 
31
}
 
32