Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - skwurp

Pages: [1]
1
Graphics / PNG loader might be broken in 1.2
« on: April 17, 2008, 07:33:36 am »
No, I made the changes myself, to the file included in version 1.2 of sfml.

I see that changing them to uint32 makes them unsigned ints, as defined in stb_image_aug.c on line 74:
Code: [Select]
typedef unsigned int   uint32;
I don't know if they should be unsigned ints, but image loading seems to work fine after the change.


Ahh, now I see that line 645 is the culprit:
Code: [Select]
static unsigned long  code_buffer; // jpeg entropy-coded buffer
If I change that to:
Code: [Select]
static uint32  code_buffer; // jpeg entropy-coded buffer
it no longer gives the "Failed to load image "thenameofyourimage.png". Reason : Corrupt PNG" error.

I don't know, maybe the other unsigned longs need changing (to be safe with 64 bit) as well?

2
Graphics / PNG loader might be broken in 1.2
« on: April 16, 2008, 01:03:35 am »
I confirm that replacing every unsigned long with uint32 in stb_image_aug.c seems to fix the problem.

Pages: [1]