From 746aefef158ba1bc400641113e81df5cb179e238 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Wed, 21 Aug 2024 17:19:19 -0300 Subject: [PATCH] Fix readbackTexture when using a preexisting sRGB ImageData. --- src/modules/graphics/GraphicsReadback.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/GraphicsReadback.cpp b/src/modules/graphics/GraphicsReadback.cpp index 6b7771d84..bee7fb8dd 100644 --- a/src/modules/graphics/GraphicsReadback.cpp +++ b/src/modules/graphics/GraphicsReadback.cpp @@ -100,7 +100,7 @@ GraphicsReadback::GraphicsReadback(Graphics *gfx, ReadbackMethod method, Texture if (dest != nullptr) { - if (dest->getFormat() != textureFormat) + if (getLinearPixelFormat(dest->getFormat()) != textureFormat) throw love::Exception("Destination ImageData pixel format must match the source Texture's format."); if (destx < 0 || desty < 0)