Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/LibSL/Image/ImageFormat_TGA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ NAMESPACE::Image *NAMESPACE::ImageFormat_TGA::load(const char *name) const
img = rgba;
// read pixels
memcpy(rgba->pixels().raw(),tga->pixels,w*h*4);
} else if (tga->depth == 8) {
// create image
ImageL8 *lum = new ImageL8(w,h);
img = lum;
memcpy(lum->pixels().raw(),tga->pixels,w*h*1);
} else {
throw Fatal("ImageFormat_TGA::load - Sorry, unknown tga format (file '%s')",name);
}
Expand Down