{
switch(colordepth)
{
+ case 1:
+ {
+ pixelFormat = Pixel::LA88;
+ valid = true;
+ break;
+ }
+
case 2:
case 4:
case 8:
: png(_png),
info(_info)
{
- DALI_ASSERT_DEBUG(&_png != 0 && &_info != 0);
}
~AutoPngWrite()
if(encoded_img)
{
const Vector<unsigned char>::SizeType bufferSize = encoded_img->Count();
- encoded_img->Reserve( bufferSize + length ); //< Can throw OOM.
+ encoded_img->Resize( bufferSize + length ); //< Can throw OOM.
unsigned char* const bufferBack = encoded_img->Begin() + bufferSize;
memcpy(bufferBack, data, length);
}
else
{
- DALI_LOG_ERROR("PNG buffer for write to memory was passed from libpng as null.");
+ DALI_LOG_ERROR("PNG buffer for write to memory was passed from libpng as null.\n");
}
}
catch(...)
{
- DALI_LOG_ERROR("C++ Exception caught");
+ DALI_LOG_ERROR("C++ Exception caught\n");
}
}
}
default:
{
- DALI_LOG_ERROR( "Unsupported pixel format for encoding to PNG." );
+ DALI_LOG_ERROR( "Unsupported pixel format for encoding to PNG.\n" );
return false;
}
}