throw std::runtime_error("image has no power of 2 size");
if(format->BitsPerPixel != 24 && format->BitsPerPixel != 32)
throw std::runtime_error("image has no 24 or 32 bit color depth");
throw std::runtime_error("image has no power of 2 size");
if(format->BitsPerPixel != 24 && format->BitsPerPixel != 32)
throw std::runtime_error("image has no 24 or 32 bit color depth");