aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/CImageLoaderPNG.cpp
diff options
context:
space:
mode:
authornumzero <numzer0@yandex.ru>2023-03-25 10:42:11 +0300
committernumzero <numzer0@yandex.ru>2023-03-25 10:42:47 +0300
commitd97d1708d68a98c039db8a06c4110bfc961d3fb1 (patch)
tree1a90cd7a34793982aa9376468feb41e67d2b7cdc /source/Irrlicht/CImageLoaderPNG.cpp
parentba77d01c91a363ad932ecd26c3eaba82ddf7a6f0 (diff)
parent799c8b936f9a2cc4f3a8bc56237fb9a8dedf853e (diff)
downloadirrlicht-d97d1708d68a98c039db8a06c4110bfc961d3fb1.tar.xz
Resolve conflicts with master
Diffstat (limited to 'source/Irrlicht/CImageLoaderPNG.cpp')
-rw-r--r--source/Irrlicht/CImageLoaderPNG.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/Irrlicht/CImageLoaderPNG.cpp b/source/Irrlicht/CImageLoaderPNG.cpp
index 59709bf..665634c 100644
--- a/source/Irrlicht/CImageLoaderPNG.cpp
+++ b/source/Irrlicht/CImageLoaderPNG.cpp
@@ -80,14 +80,14 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
// Read the first few bytes of the PNG file
if( file->read(buffer, 8) != 8 )
{
- os::Printer::log("LOAD PNG: can't read file\n", file->getFileName(), ELL_ERROR);
+ os::Printer::log("LOAD PNG: can't read file (filesize < 8)", file->getFileName(), ELL_ERROR);
return 0;
}
// Check if it really is a PNG file
if( png_sig_cmp(buffer, 0, 8) )
{
- os::Printer::log("LOAD PNG: not really a png\n", file->getFileName(), ELL_ERROR);
+ os::Printer::log("LOAD PNG: not really a png (wrong signature)", file->getFileName(), ELL_ERROR);
return 0;
}
@@ -96,7 +96,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
NULL, (png_error_ptr)png_cpexcept_error, (png_error_ptr)png_cpexcept_warn);
if (!png_ptr)
{
- os::Printer::log("LOAD PNG: Internal PNG create read struct failure\n", file->getFileName(), ELL_ERROR);
+ os::Printer::log("LOAD PNG: Internal PNG create read struct failure", file->getFileName(), ELL_ERROR);
return 0;
}
@@ -104,7 +104,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
png_infop info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr)
{
- os::Printer::log("LOAD PNG: Internal PNG create info struct failure\n", file->getFileName(), ELL_ERROR);
+ os::Printer::log("LOAD PNG: Internal PNG create info struct failure", file->getFileName(), ELL_ERROR);
png_destroy_read_struct(&png_ptr, NULL, NULL);
return 0;
}
@@ -212,7 +212,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
image = new CImage(ECF_R8G8B8, core::dimension2d<u32>(Width, Height));
if (!image)
{
- os::Printer::log("LOAD PNG: Internal PNG create image struct failure\n", file->getFileName(), ELL_ERROR);
+ os::Printer::log("LOAD PNG: Internal PNG create image struct failure", file->getFileName(), ELL_ERROR);
png_destroy_read_struct(&png_ptr, NULL, NULL);
return 0;
}
@@ -221,7 +221,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
RowPointers = new png_bytep[Height];
if (!RowPointers)
{
- os::Printer::log("LOAD PNG: Internal PNG create row pointers failure\n", file->getFileName(), ELL_ERROR);
+ os::Printer::log("LOAD PNG: Internal PNG create row pointers failure", file->getFileName(), ELL_ERROR);
png_destroy_read_struct(&png_ptr, NULL, NULL);
delete image;
return 0;