unsigned h = img.get_height();
PixelFormat fmt = pixelformat_from_graphics(img.get_format());
if(width==0)
- {
- PixelFormat f = storage_pixelformat_from_graphics(img.get_format());
- if(srgb)
- f = get_srgb_pixelformat(f);
- storage(f, w, h);
- }
+ storage(storage_pixelformat_from_graphics(img.get_format(), srgb), w, h);
else if(w!=width || h!=height)
throw incompatible_data("Texture2D::image");