vilanew at gmail.com
Wed Mar 14 08:54:58 PDT 2012
Great that did the trick. I have modified the pitch to w*3 so that the
surface looks like that now:
SDL_Surface *image = SDL_CreateRGBSurfaceFrom(
0, 0, 0, 0);
Got correct image !!!
On 03/14/2012 05:31 PM, Bl0ckeduser wrote:
> David martin wrote:
>> SDL_Surface *image = SDL_CreateRGBSurfaceFrom(
>> 0, 0, 0, 0);
> I believe your pitch (fifth argument) should be w * 3, not w, as in
> 24-bit RGB there are 3 bytes for each pixel.
> From the SDL documentation:
> "Pitch is the size of the scanline of the surface, in bytes, i.e.
More information about the SDL