Page 1 of 1

Cross-platform images, in application.

Posted: Wed Mar 08, 2006 4:12 am
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.

Posted: Wed Mar 08, 2006 4:36 am
by Dare2
Not sure, but perhaps you looking for something like IncludeBinary and catchimage (which are, I think, for all platforms).

Posted: Wed Mar 08, 2006 6:01 am
by doodlemunch
raw

Posted: Wed Mar 08, 2006 5:44 pm
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:

Posted: Wed Mar 08, 2006 6:03 pm
by Straker
Isnt PNG (and the decoder) cross-platform?

Posted: Wed Mar 08, 2006 6:13 pm
by Fred
All the images decoders are cross plateform, so combining includebinary with catchimage should be no problem.

Posted: Wed Mar 08, 2006 6:24 pm
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!