diff options
Diffstat (limited to 'indra/llimage/llimagedimensionsinfo.cpp')
-rw-r--r-- | indra/llimage/llimagedimensionsinfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index 97b543f3b6..9dd69ff132 100644 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp @@ -50,6 +50,7 @@ bool LLImageDimensionsInfo::load(const std::string& src_filename,U32 codec) if (file_size == 0) { + mWarning = "texture_load_empty_file"; setLastError("File is empty",src_filename); return false; } @@ -90,6 +91,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp() if (signature[0] != 'B' || signature[1] != 'M') { LL_WARNS() << "Not a BMP" << LL_ENDL; + mWarning = "texture_load_format_error"; return false; } @@ -140,6 +142,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng() if (memcmp(signature, png_magic, PNG_MAGIC_SIZE) != 0) { LL_WARNS() << "Not a PNG" << LL_ENDL; + mWarning = "texture_load_format_error"; return false; } @@ -183,6 +186,7 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() if (memcmp(signature, jpeg_magic, JPEG_MAGIC_SIZE) != 0) { LL_WARNS() << "Not a JPEG" << LL_ENDL; + mWarning = "texture_load_format_error"; return false; } fseek(fp, 0, SEEK_SET); // go back to start of the file |