aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/CImageLoaderPNG.cpp
diff options
context:
space:
mode:
authorcutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2022-06-30 16:23:48 +0000
committersfan5 <sfan5@live.de>2023-03-24 17:09:11 +0100
commit98df6eae77d646eb8958ce39988d2c0c8da0b1ba (patch)
treee345393ac855fe3fe466cc3178d93869785694cb /source/Irrlicht/CImageLoaderPNG.cpp
parent3ce4b2b5dceb2c0c0d265d04a9aac72aba544c3a (diff)
downloadirrlicht-98df6eae77d646eb8958ce39988d2c0c8da0b1ba.tar.xz
Unify & improve log messages
Lots of places where coders did not realize our Printer::log with hint adds a ": " string between message and hint Which caused uglier messages in a few places (added documentation for that, maybe helps?) Some added info in a few places Some whitespace unification Some spelling unification git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6414 dfc29bdd-3216-0410-991c-e03cc46cb475
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;