-
Notifications
You must be signed in to change notification settings - Fork 3
/
ImageIO.h
41 lines (38 loc) · 1.53 KB
/
ImageIO.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
///////////////////////////////////////////////////////////////////////////
//
// NAME
// ImageIO.h -- image file input/output
//
// DESCRIPTION
// Read/write image files, potentially using an interface to an
// external package.
//
// You can either pass and empty (unitialized) image to ReadImage,
// or one you have already allocated (with a specific pixel type).
//
// If you don't initialize the image, the type of the returned image
// (e.g., 1 band vs. 4 band) will be determined by the image file.
// If you do initialize the image, it will be re-allocated if necessary,
// and the data will be coerced into the type you specified.
//
// File formats currently supported:
// - a subset of Targa
// - PGM (1 band) and PPM (4 band)
// - PMF (multiband float) - homegrown, non-standard
// - PFM (1-band float, see http://netpbm.sourceforge.net/doc/pfm.html)
// - PNG (requires ImageIOpng.cpp, and pnglib and zlib packages)
//
// SEE ALSO
// ImageIO.cpp implementation
// ImageIOpng.cpp png reader/writer
//
// Copyright © Richard Szeliski and Daniel Scharstein, 2001.
// added PFM 10/2/2013 DS
// See Copyright.h for more details
//
///////////////////////////////////////////////////////////////////////////
void ReadImage (CImage& img, const char* filename);
void WriteImage(CImage& img, const char* filename);
void ReadImageVerb (CImage& img, const char* filename, int verbose);
void WriteImageVerb(CImage& img, const char* filename, int verbose);
void WriteFilePFM(CFloatImage img, const char* filename, float scalefactor);