ReactOS 0.4.15-dev-8332-ga943bb4
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 420 of file tif_stream.cxx.

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

◆ TIFFStreamOpen() [2/2]

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

Definition at line 404 of file tif_stream.cxx.

405{
406 // If os is either a ostrstream or ostringstream, and has no data
407 // written to it yet, then tellp() will return -1 which will break us.
408 // We workaround this by writing out a dummy character and
409 // then seek back to the beginning.
410 if( !os->fail() && static_cast<int>(os->tellp()) < 0 ) {
411 *os << '\0';
412 os->seekp(0);
413 }
414
415 // NB: We don't support mapped files with streams so add 'm'
416 return _tiffStreamOpen(name, "wm", os);
417}