diff options
author | Merov Linden <merov@lindenlab.com> | 2011-04-13 14:05:31 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2011-04-13 14:05:31 -0700 |
commit | 759d72a46c5d487e6881426f90c54c6ae2da4847 (patch) | |
tree | bcbf6f2c2294eaa4052c9c53c59a89f7a59852e1 /indra/integration_tests/llimage_libtest | |
parent | 505e5e403d6439f29d60861553656d01522cb241 (diff) |
EXP-669 : Refactor code to use correct LLImageFormatted methods to load images of all formats, reviewed by richard
Diffstat (limited to 'indra/integration_tests/llimage_libtest')
-rw-r--r-- | indra/integration_tests/llimage_libtest/llimage_libtest.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 365f5f758c..03a79532c8 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -69,31 +69,8 @@ static bool sAllDone = false; // Create an empty formatted image instance of the correct type from the filename LLPointer<LLImageFormatted> create_image(const std::string &filename) { - std::string exten = gDirUtilp->getExtension(filename); - U32 codec = LLImageBase::getCodecFromExtension(exten); - - LLPointer<LLImageFormatted> image; - switch (codec) - { - case IMG_CODEC_BMP: - image = new LLImageBMP(); - break; - case IMG_CODEC_TGA: - image = new LLImageTGA(); - break; - case IMG_CODEC_JPEG: - image = new LLImageJPEG(); - break; - case IMG_CODEC_J2C: - image = new LLImageJ2C(); - break; - case IMG_CODEC_PNG: - image = new LLImagePNG(); - break; - default: - return NULL; - } - + std::string exten = gDirUtilp->getExtension(filename); + LLPointer<LLImageFormatted> image = LLImageFormatted::createFromExtension(exten); return image; } |