]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/pixelformat.cpp
Fix loading sRGB external images for textures
[libs/gl.git] / source / core / pixelformat.cpp
index 8cc7c9c9d8f2e13fa0d9d05f4de57128a8233491..9a28cdcebfee50d3de079bc96d3c96baa0892212 100644 (file)
@@ -336,6 +336,11 @@ DataType get_component_type(PixelFormat pf)
        }
 }
 
+bool is_srgb(PixelFormat pf)
+{
+       return (pf==SRGB8 || pf==SRGB8_ALPHA8 || pf==SBGR8 || pf==SBGR8_ALPHA8);
+}
+
 unsigned get_pixel_size(PixelFormat pf)
 {
        return get_component_count(pf)*get_type_size(get_component_type(pf));