|
|
@ -31,7 +31,7 @@ EXIV2_RCSID("@(#) $Id$")
|
|
|
|
|
|
|
|
|
|
|
|
// *****************************************************************************
|
|
|
|
// *****************************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
//#define DEBUG 1
|
|
|
|
#define DEBUG 1
|
|
|
|
|
|
|
|
|
|
|
|
// *****************************************************************************
|
|
|
|
// *****************************************************************************
|
|
|
|
// included header files
|
|
|
|
// included header files
|
|
|
@ -78,10 +78,18 @@ namespace Exiv2 {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (create)
|
|
|
|
if (create)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (io_->open())
|
|
|
|
if (io_->open() == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
std::cerr << "Exiv2::PngImage:: Creating PNG image to memory\n";
|
|
|
|
|
|
|
|
#endif
|
|
|
|
IoCloser closer(*io_);
|
|
|
|
IoCloser closer(*io_);
|
|
|
|
io_->write(pngBlank, sizeof(pngBlank));
|
|
|
|
if (io_->write(pngBlank, sizeof(pngBlank)) != sizeof(pngBlank))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
std::cerr << "Exiv2::PngImage:: Failed to create PNG image on memory\n";
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // PngImage::PngImage
|
|
|
|
} // PngImage::PngImage
|
|
|
|