21#ifndef TINYTIFFREADER_HXX 
   22#define TINYTIFFREADER_HXX 
   25    #include "tinytiffreader.h" 
   88template <
class Tin, 
class Tout>
 
   93    tmp.resize(wwidth*hheight);
 
   95    for (uint32_t i=0; i<wwidth*hheight; i++) {
 
   96        buffer[i]=
static_cast<Tout
>(tmp[i]);
 
 
  157template <
class Tin, 
class Tout>
 
  161    if (buffer_size<wwidth*hheight) 
throw std::runtime_error(
"output buffer too small!");
 
  162    std::vector<Tin> tmp;
 
  163    tmp.resize(wwidth*hheight);
 
  165    for (uint32_t i=0; i<wwidth*hheight; i++) {
 
  166        buffer[i]=
static_cast<Tout
>(tmp[i]);
 
 
uint32_t TinyTIFFReader_getWidth(TinyTIFFReaderFile *tiff)
return the width of the current frame
Definition tinytiffreader.c:1033
 
int TinyTIFFReader_getSampleData_s(TinyTIFFReaderFile *tiff, void *buffer, unsigned long buffer_size, uint16_t sample)
read the given sample from the current frame into the given buffer, the byteorder is transformed to t...
Definition tinytiffreader.c:928
 
uint32_t TinyTIFFReader_getHeight(TinyTIFFReaderFile *tiff)
return the height of the current frame
Definition tinytiffreader.c:1040
 
void TinyTIFFReader_readFrame_s(TinyTIFFReaderFile *tif, Tout *buffer, unsigned long buffer_size, uint16_t sample=0)
template function that internally calls TinyTIFFReader_getSampleData_s() and copies the data into the...
Definition tinytiffreader.hxx:158
 
void TinyTIFFReader_readFrame(TinyTIFFReaderFile *tif, Tout *buffer, uint16_t sample=0)
template function that internally calls TinyTIFFReader_getSampleData() and copies the data into the s...
Definition tinytiffreader.hxx:89
 
Definition tinytiffreader.c:154