Pandabas Needs To Load Images...


Dunny

Exophase Approved® Forum Troll
Joined
Dec 24, 2006
Messages
1,112
Age
51
Location
Broughton, Brigg, UK
Website
www.zxspin.com
Hi all -

Work continues apace on PandaBAS, and having settled on a sound library (now using the BASS library for sound and music), I need to be able to load BMP/GIF/PNG images at the very least. Only need to support 8bpp at present. I'm writing PandaBAS in FPC for the linux/pandora versions and Delphi 2010 for the Windows version, so I need a library that:

Has an FPC header file (.pas)
Comes as both .so and .dll binaries.

I'm not too fussed about open-source as BASS isn't open source and I'm using that quite happily. PandaBAS is currently GPL, but I'm willing to abandon the GPL and go closed-source if necessary.

Any suggestions?

D.
 
This is what you want:

http://nothings.org/stb_image.c

You can generate your own .pas header, I think, pretty easily ..
 
torpor said:
This is what you want:

http://nothings.org/stb_image.c

You can generate your own .pas header, I think, pretty easily ..

Thanks, I might give that a try - though I was thinking I could use SDL_Image on the Pandora/Linux version and then use a superior solution (say, GraphicEx) on the Windows version. This looks like it might do the job though - but it does carry warnings in the source that it's for coders that are not feeding it exotic or broken images, and as this would be used as the image loader for the BASIC interpreter, I can't guarantee that :(

D.
 
Last edited by a moderator:
Only need to support 8bpp at present.

I think that stb_image is as good as it gets for this requirement, and I think you'd have to be pretty exotic to find an 8-bit image it won't load ..
 
Back
Top