Cross-platform images, in application.

Just starting out? Need help? Post your questions and find answers here.
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Cross-platform images, in application.

Post by USCode »

I'm out of my element here (images, drawing) so I'm not sure exactly how to ask this question, but...

- I want to utilize some small images in my application but don't want to distribute them seperately from the program.

- They will probably just be something like 32x32 or 64x64 max, multiple colors.

- The application will be cross-platform so the images and mechanism to include them must be cross-platform.

Total speculation on my part:
If I have an image, is it possible to have that image automatically translated into a series of RGB values and x,y coordinates. That series could then be included in a data section in the application? That data would then be read at runtime and the image "drawn" on an Image output?

There must be an easier way, I'm sure I'm making it way too complicated...

Any simple code examples are appreciated.
Last edited by USCode on Wed Mar 08, 2006 6:46 am, edited 1 time in total.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Not sure, but perhaps you looking for something like IncludeBinary and catchimage (which are, I think, for all platforms).
@}--`--,-- A rose by any other name ..
doodlemunch
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Apr 05, 2005 11:20 pm

Post by doodlemunch »

raw
my english is horribel i know - SORRY i am dyslexic - i uses pb 3.94
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Post by USCode »

Dang, I was hoping for some handy super-duper feature in PB I wasn't aware of that would take care of this issue for me automagically! :wink: :wink:
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post by Straker »

Isnt PNG (and the decoder) cross-platform?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

All the images decoders are cross plateform, so combining includebinary with catchimage should be no problem.
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Post by USCode »

Fred wrote:All the images decoders are cross plateform, so combining includebinary with catchimage should be no problem.
Ah, I got it now, I think that will do what I want! Thanks guys!
Post Reply