if(img.get_height()!=1)
throw incompatible_data("Texture1D::image");
- unsigned w = img.get_width();
- PixelFormat fmt = pixelformat_from_image(img);
- storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, lv);
-
+ storage(pixelformat_from_image(img, use_srgb_format), img.get_width(), lv);
image(0, img.get_pixels());
}