hiding a bitmap from the user

Started by
11 comments, last by OB1st 21 years, 10 months ago
quote:Original post by OB1st
How do I include my bitmap file in the project in text format, and therfore not have to e-mail it with the executable for others to run it.


Do you suppose by including the bitmap as text in your .rc file the size of the latter won't grow? In fact, a byte can have 256 values while a character only 96. So by storing bitmap data as text, you'll need more space. There's little point in storing bitmaps as text in resource files. Just distribute your bitmaps with your projects like everyone does.

You don't need to distribute the bitmap files with your executable, since they are already in the executable. If you can't load them from .exe, you're doing something wrong.

Also consider using compressed file formats, if you aren't already doing so. JPEGs are nice if you can live with losses, otherwise go with PNGs. D3DX can load them, so why waste space for uncompressed bitmaps?

[edited by - IndirectX on June 2, 2002 7:09:29 AM]
---visit #directxdev on afternet <- not just for directx, despite the name
Advertisement
Thanks for the usefull discussion.



If love is illusion and hate is real, I would rather be crazy
I would love going home to M7, but I can't detect black holes.
Ironblayde brought up this topic in the Game Programming Genesis series: "You don''t want anyone to change your beautifully scripted end scene to a version of ''all your base are belong to us'', do you?", he said. True enough. As I see it, the best solution (as previously mentioned) is to generate a pack file where you store all your resources, and then access the pack file and extract resources from it run-time, much like Blizzard''s MPQ format or .PAK files in quake.

There is a great code example of this in Chris Hargrove''s Code on the Cob series here on gamedev. It is pretty tough code that takes some skill to understand, though.

Besides, to store things in resources often isn''t a good solution. There is no reason to make things platform-dependent when you can avoid it.
"Archangel, dark angellend me thy lightthrough death''s fail until we have heaven in sight"

This topic is closed to new replies.

Advertisement