libpniio
Data Structures | Typedefs | Enumerations | Functions | Variables
pni::io::tiff Namespace Reference

Data Structures

class  ifd
 IFD - Image File Directory class. More...
 
class  ifd_entry
 class for IFD entries More...
 
class  ifd_entry_reader
 IFD entry reader template. More...
 
class  ifd_entry_reader< pni::core::string, pni::core::string >
 IFD entry reader specialization for strings. More...
 
class  rational
 rational type for TIFF IFD entries More...
 
class  strip_reader
 reader for strip data in a TIFF file More...
 
class  tiff_read_error
 error during TIFF reading More...
 

Typedefs

typedef rational
< pni::core::uint32 > 
uirational
 
typedef rational
< pni::core::int32 > 
irational
 

Enumerations

enum  ifd_entry_type_id {
  ifd_entry_type_id::BYTE, ifd_entry_type_id::ASCII, ifd_entry_type_id::SHORT, ifd_entry_type_id::LONG,
  ifd_entry_type_id::RATIONAL, ifd_entry_type_id::SBYTE, ifd_entry_type_id::UNDEFINED, ifd_entry_type_id::SSHORT,
  ifd_entry_type_id::SLONG, ifd_entry_type_id::SRATIONAL, ifd_entry_type_id::FLOAT, ifd_entry_type_id::DOUBLE
}
 

Functions

template<typename T >
std::ostream & operator<< (std::ostream &o, const rational< T > &r)
 
std::ostream & operator<< (std::ostream &o, const tiff_read_error &e)
 
std::ostream & operator<< (std::ostream &o, const ifd &image_dir)
 
std::ostream & operator<< (std::ostream &o, const ifd_entry &e)
 
std::ostream & operator<< (std::ostream &o, const strip_reader &r)
 

Variables

std::map< pni::core::uint16,
pni::core::string > 
tiff_tag_name_map
 
std::map< pni::core::uint16,
pni::core::string > 
tiff_compression_tag_map
 
std::map< pni::core::uint16,
pni::core::string > 
tiff_photo_tag_map
 
std::map< uint16,
ifd_entry_type_id
type_tag_to_entry_type_id
 
std::map< ifd_entry_type_id,
type_id_t > 
entry_type_to_type_id
 

Typedef Documentation

typedef rational<pni::core::int32> pni::io::tiff::irational
typedef rational<pni::core::uint32> pni::io::tiff::uirational

Enumeration Type Documentation

Enumerator
BYTE 

8Bit unsigned int

ASCII 

string of 8Bit values with binary terminated with a binary 0

SHORT 

16Bit unsigned integer

LONG 

32Bit unsigned integer

RATIONAL 

two LONG values

SBYTE 

8Bit signed integer

UNDEFINED 
SSHORT 

as said: undefined

16Bit signed integer

SLONG 

32Bit signed integer

SRATIONAL 

like RATIONAL but signed

FLOAT 

4Byte IEEE float

DOUBLE 

8Byte IEEE float

Function Documentation

std::ostream& pni::io::tiff::operator<< ( std::ostream &  o,
const tiff_read_error &  e 
)
std::ostream& pni::io::tiff::operator<< ( std::ostream &  o,
const ifd &  image_dir 
)

Thiss operator can be used to dump the content of an IFD to standard out.

Parameters
ooutput stream
image_dirImage directory to print
Returns
output stream
std::ostream& pni::io::tiff::operator<< ( std::ostream &  o,
const strip_reader &  r 
)
template<typename T >
std::ostream& pni::io::tiff::operator<< ( std::ostream &  o,
const rational< T > &  r 
)
std::ostream& pni::io::tiff::operator<< ( std::ostream &  o,
const ifd_entry &  e 
)

Variable Documentation

std::map<ifd_entry_type_id,type_id_t> pni::io::tiff::entry_type_to_type_id
Initial value:
=
{{ifd_entry_type_id::BYTE,pni::core::type_id_t::UINT8},
{ifd_entry_type_id::ASCII,pni::core::type_id_t::STRING},
{ifd_entry_type_id::SHORT,pni::core::type_id_t::UINT16},
{ifd_entry_type_id::LONG,pni::core::type_id_t::UINT32},
{ifd_entry_type_id::RATIONAL,pni::core::type_id_t::FLOAT64},
{ifd_entry_type_id::SBYTE,pni::core::type_id_t::INT8},
{ifd_entry_type_id::UNDEFINED,pni::core::type_id_t::NONE},
{ifd_entry_type_id::SSHORT,pni::core::type_id_t::INT16},
{ifd_entry_type_id::SLONG,pni::core::type_id_t::INT32},
{ifd_entry_type_id::SRATIONAL,pni::core::type_id_t::FLOAT64},
{ifd_entry_type_id::FLOAT,pni::core::type_id_t::FLOAT32},
{ifd_entry_type_id::DOUBLE,pni::core::type_id_t::FLOAT64}}
std::map<pni::core::uint16,pni::core::string> pni::io::tiff::tiff_compression_tag_map
Initial value:
=
{
{1,"Uncompressed"}, {2,"CCITT 1D"},
{3,"Group 3 Fax"}, {4,"Group 4 Fax"},
{5,"LZW"}, {6,"JPEG"}, {32773,"PackBits"}
}
std::map<pni::core::uint16,pni::core::string> pni::io::tiff::tiff_photo_tag_map
Initial value:
=
{
{0,"WhiteIsZero"}, {1,"BlackIsZero"},
{2,"RGB"}, {3,"RGB Palette"},
{4,"Transparency mask"}, {5,"CMYK"},
{6,"YCbCr"}, {8,"CIELab"}
}
std::map<pni::core::uint16,pni::core::string> pni::io::tiff::tiff_tag_name_map
std::map<uint16,ifd_entry_type_id> pni::io::tiff::type_tag_to_entry_type_id
Initial value:
=
{{1,ifd_entry_type_id::BYTE},
{2,ifd_entry_type_id::ASCII},
{3,ifd_entry_type_id::SHORT},
{4,ifd_entry_type_id::LONG},
{5,ifd_entry_type_id::RATIONAL},
{6,ifd_entry_type_id::SBYTE},
{7,ifd_entry_type_id::UNDEFINED},
{8,ifd_entry_type_id::SSHORT},
{9,ifd_entry_type_id::SLONG},
{10,ifd_entry_type_id::SRATIONAL},
{11,ifd_entry_type_id::FLOAT},
{12,ifd_entry_type_id::DOUBLE}}