libpng
.
More...
Inheritance diagram for Archon::Utilities::FormatLibpng:
Public Member Functions | |
string | getSpecifier () const |
bool | checkSignature (Ref< Stream::Reader > r) const |
bool | checkSuffix (string s) const |
Image | load (Ref< Stream::Reader > reader, Image::ProgressTracker *tracker, Logger *logger) const throw (Image::InvalidFormatException, IOException, UnexpectedException) |
void | save (Image image, Ref< Stream::Writer > writer, Image::ProgressTracker *tracker, Logger *logger) const throw (IOException, UnexpectedException) |
Classes | |
struct | Context |
struct | LoadContext |
struct | LoadWrapper |
struct | SaveContext |
struct | SaveWrapper |
libpng
.
libpng
version 1.2.8.Notes on using setjump/longjump in C++:
Great care must be taken when using setjump/longjump in C++ context. The main problem is that stack objects will not have their destructors called during a long jump stack unwinding process.
In this case we set up the long jump handler in a C++ function and then call a number of C (not C++) functions, and it is only these C functions that can potentially issue a long jump. This fact makes things a bit easier to control.
We should be safe as long as we stick to the following rules:
if(!setjmp(jmpbuf)) // try { // code that may potentially issue a long jump (throw) } else // catch { // code that handles the long jump (exception) }
Definition at line 104 of file image_libpng.C.
|
Implements Archon::Utilities::Image::Format. Definition at line 130 of file image_libpng.C. References Archon::Utilities::Array< T >::get(), Archon::Utilities::Image::Format::getPixelBufferNoLeak(), Archon::Utilities::logger, Archon::Utilities::reader, and Archon::Utilities::Array< T >::reset(). |
|
Implements Archon::Utilities::Image::Format. Definition at line 244 of file image_libpng.C. References Archon::Utilities::Image::components_l, Archon::Utilities::Image::components_la, Archon::Utilities::Image::components_rgb, Archon::Utilities::Image::components_rgba, Archon::Utilities::Array< T >::get(), Archon::Utilities::Image::Format::getPixelBufferNoLeak(), Archon::Utilities::CharEnc::ISO_8859_1, Archon::Utilities::logger, Archon::Utilities::Array< T >::reset(), Archon::Math::BasicVector< T, N >::size, Archon::Utilities::Text::toString(), Archon::Utilities::CharEnc::transcode(), Archon::Utilities::CharEnc::UTF_8, and Archon::Utilities::writer. |