Need help testing code (easy!)

Hey all. I'm running final tests on my modification to this stb_image lib (what SFML uses to load images).

Everything is working great with VC++ 2010 on Windows, but before I submit this as an actual update, I'd like to get it tested on other compilers/platforms. I know some of you on here are on Mac/*nix, so I was hoping you could help with this.

It's very simple:

1) Download this file. It contains one source file and one header:
http://www.filedropper.com/stbtest

2) Get any image (bmp,gif,png,jpg are fine) name it "img.png" or "img.<ext>".

3) Put that image in the ./ directory (or anywhere the program will see it)

4) Compile & run

5) Post here and report back!

Please let me know:

- Compiler + version
- OS
- Any compilation errors?
- In the first block of the output ("Testing load") it should say "<ext>: OK" and give a bunch of numbers. Did you get that message? Or did you just get error messages?



There's no platform specific code, so I'm pretty sure there won't be any problem. I'm just doing this for due diligence.

Specifically, I'm mainly interested in gcc, *nix, and mac. Other obscure platforms/compilers are gravy.

I appreciate the help!

PS: If anyone can find/make a freaking .pic file that would also be awesome.
Have you tried a virtual machine? It's great for testing purposes.

PS: If anyone can find/make a freaking .pic file that would also be awesome.
Damn, that's one obscure format. It seems to date back to DOS.
Sorry, I got nothing.
Hope this helps :)

Fedora 11 i386 (Linux) g++ (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)

[new:src]$ g++ -o main main.cpp -Wall -Wextra -ansi -pedantic


In file included from main.cpp:4:
stb_image.h: In function ‘stbi_uc* stbi_gif_load(stbi*, int*, int*, int*, int)’:
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::h’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::out’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::flags’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::bgindex’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::ratio’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::transparent’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::eflags’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::pal’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::lpal’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::codes’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::color_table’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::parse’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::step’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::lflags’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::start_x’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::start_y’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::max_x’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::max_y’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::cur_x’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::cur_y’
stb_image.h:4182: warning: missing initializer for member ‘stbi_gif_struct::line_size’
main.cpp: At global scope:
main.cpp: In instantiation of ‘unsigned int arraysize(const T (&)[S]) [with T = std::string, unsigned int S = 8u]’:
main.cpp:27:   instantiated from here
main.cpp:10: warning: unused parameter ‘v’


[new:src]$ ./main


Testing Load:
bmp: failed - can't fopen
gif: failed - can't fopen
png: OK - x=256 y=256 comp=4
tga: failed - can't fopen
jpg: failed - can't fopen
psd: failed - can't fopen
hdr: failed - can't fopen
pic: failed - can't fopen

Testing LoadF:
bmp: failed - can't fopen
gif: failed - can't fopen
png: OK - x=256 y=256 comp=4
tga: failed - can't fopen
jpg: failed - can't fopen
psd: failed - can't fopen
hdr: failed - can't fopen
pic: failed - can't fopen

Testing Info:
bmp: failed - can't fopen
gif: failed - can't fopen
png: OK - x=256 y=256 comp=4
tga: failed - can't fopen
jpg: failed - can't fopen
psd: failed - can't fopen
hdr: failed - can't fopen
pic: failed - can't fopen

Testing IsHdr:
bmp: failed - can't fopen
gif: failed - can't fopen
png: failed - can't fopen
tga: failed - can't fopen
jpg: failed - can't fopen
psd: failed - can't fopen
hdr: failed - can't fopen
pic: failed - can't fopen

Awesome!

Thanks, that's wonderful.
Topic archived. No new replies allowed.