Thanks
I looked in the wiki again and it is described there if you look closely.
What I don’t quite understand is that it says that no copy of the pixel data is created.
But why doesn’t it work with SDL_DestroySurface
?
As is the case here? [SDL 3.x] SDL_CreateSurface and SDL_DestroySurface = SIGSEV - #3 by Mathias
I have another suggestion for improvement. That SDL_CreateSurfaceFrom
would calculate the pitch itself if you pass 0. Based on the width and the pixel format, this should work.