void* ImgLoader::loadImage(int& _width, int& _height, MyGUI::PixelFormat& _format, const std::string& _filename)
{
if (!mImage.LoadFromFile(_filename))
return NULL;
_width = mImage.GetWidth();
_height = mImage.GetHeight();
_format = MyGUI::PixelFormat::R8G8B8A8;
size_t size = _width * _height ;
void* data = new unsigned char[size];
memcpy(data, mImage.GetPixelsPtr(), size);
return data;
}
it doesn't load the image