Browse Source

Fix love.graphics.newTexture(imagedata, {canvas=true}) not using an sRGB format when it should

Alex Szpakowski 5 years ago
parent
commit
e0ff593d09
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/modules/graphics/Texture.cpp

+ 2 - 0
src/modules/graphics/Texture.cpp

@@ -194,6 +194,8 @@ Texture::Texture(const Settings &settings, const Slices *slices)
 		love::image::ImageDataBase *slice = slices->get(0, 0);
 
 		format = slice->getFormat();
+		if (sRGB)
+			format = getSRGBPixelFormat(format);
 
 		pixelWidth = slice->getWidth();
 		pixelHeight = slice->getHeight();