ReactOS 0.4.16-dev-2613-g9533ad7
tiffio.hxx File Reference
#include <iostream>
#include "tiff.h"
#include "tiffio.h"
Include dependency graph for tiffio.hxx:

Go to the source code of this file.

Functions

TIFFTIFFStreamOpen (const char *, std::ostream *)
 
TIFFTIFFStreamOpen (const char *, std::istream *)
 

Function Documentation

◆ TIFFStreamOpen() [1/2]

TIFF * TIFFStreamOpen ( const char name,
std::istream is 
)

Definition at line 400 of file tif_stream.cxx.

401{
402 // NB: We don't support mapped files with streams so add 'm'
403 return _tiffStreamOpen(name, "rm", is);
404}
Definition: name.c:39
static TIFF * _tiffStreamOpen(const char *name, const char *mode, void *fd)
Definition: tif_stream.cxx:343

◆ TIFFStreamOpen() [2/2]

TIFF * TIFFStreamOpen ( const char name,
std::ostream os 
)

Definition at line 384 of file tif_stream.cxx.

385{
386 // If os is either a ostrstream or ostringstream, and has no data
387 // written to it yet, then tellp() will return -1 which will break us.
388 // We workaround this by writing out a dummy character and
389 // then seek back to the beginning.
390 if (!os->fail() && static_cast<int>(os->tellp()) < 0)
391 {
392 *os << '\0';
393 os->seekp(0);
394 }
395
396 // NB: We don't support mapped files with streams so add 'm'
397 return _tiffStreamOpen(name, "wm", os);
398}