SDL_image: SDL3: fix IMG_jxl.c

From 26eba057cbd383d7476d3932908a96cf4328f893 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 31 Jan 2023 06:03:11 +0100
Subject: [PATCH] SDL3: fix IMG_jxl.c

---
 IMG_jxl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/IMG_jxl.c b/IMG_jxl.c
index ef15da44..660d0fdf 100644
--- a/IMG_jxl.c
+++ b/IMG_jxl.c
@@ -214,7 +214,7 @@ SDL_Surface *IMG_LoadJXL_RW(SDL_RWops *src)
             break;
         case JXL_DEC_SUCCESS:
             /* All done! */
-            surface = SDL_CreateSurface(info.xsize, info.ysize, pitch, SDL_PIXELFORMAT_RGBA32);
+            surface = SDL_CreateSurfaceFrom(pixels, info.xsize, info.ysize, pitch, SDL_PIXELFORMAT_RGBA32);
             if (surface) {
                 /* Let SDL manage the memory now */
                 pixels = NULL;