Crash when loading images that are 16384x128

Yep,

I have 128 frames of an image thats 128x128. This is 8 meg of ram, I
thought I would be safe using it but it seems a little bit much for SDL?
Just looking for a confirm or any thoughts you have. I’m using SDL_IMAGE
lib to load it in.

Rob

Yep,

I have 128 frames of an image thats 128x128. This is 8 meg of ram, I
thought I would be safe using it but it seems a little bit much for SDL?
Just looking for a confirm or any thoughts you have. I’m using SDL_IMAGE
lib to load it in.

Since it is 65536 bytes wide, and SDL only uses 16 bit integers to store
all pixel offsets and such, you are guaranteed to get into trouble. :wink:
Hopfully, this will be fixed in SDL 1.3…

On a side note: You will most likely get a performance enhancement if you
rotate the frame layout so that the image is 128x16384 instead.On Tue, 23 May 2006, Rob wrote:

Ah! Thank you for clearing that up :slight_smile:

Mattias Karlsson wrote:> On Tue, 23 May 2006, Rob wrote:

Yep,

I have 128 frames of an image thats 128x128. This is 8 meg of ram, I
thought I would be safe using it but it seems a little bit much for SDL?
Just looking for a confirm or any thoughts you have. I’m using SDL_IMAGE
lib to load it in.

Since it is 65536 bytes wide, and SDL only uses 16 bit integers to store
all pixel offsets and such, you are guaranteed to get into trouble. :wink:
Hopfully, this will be fixed in SDL 1.3…

On a side note: You will most likely get a performance enhancement if you
rotate the frame layout so that the image is 128x16384 instead.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl