Archived

This topic is now archived and is closed to further replies.

Images in files vs VC Resources

This topic is 6362 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m not completely sure, so don''t consider my statements as 100% correct advices.

1. Anyone can pull out a resource from an exe file, knowing the resource ID. Your own resource file will prevent this, if implemented properly.
2. If your data file is changed, you will have to recompile your project in order for these changes to take effect. This can be VERY annoying, and inefficient. This is the main reason.
3. It''s late, I''ve been coding for 11 hours straight at work, so I can''t think anymore

Share this post


Link to post
Share on other sites
Not to mention it also bloats the size of your executable.I think a good rule of thumb is to leave pictures in seperate files, and icons in your resource file (unless you have a lot of icons, then leave them out also).

----------
meh

Share this post


Link to post
Share on other sites
Resources inside your EXE will definitely bloat the file size, but Windows will not load those pages into memory until they''re used. The best way to keep resources, if you have a lot of them, is to create a resource DLL. Then you can recompile the resource DLL whenever you want without recompiling your program. Also, it keeps them tidy in a single file rather than raw files in a directory. A resource DLL is Window''s equivelant of a doom ''WAD'' file.. heh..

// CHRIS

Share this post


Link to post
Share on other sites
 Actually, the best way to keep lots of images would be in a wad type file.Both pak and wad files are good examples, because many editors for them already exist; you can manage them without writing a packer program.All you would need is an unpacking routine in your program which you could be as simple or complex as you want.
 Resource files and libraries are an okay solution for windows, but the second you step out, you''ll have to use a different way to store your files, and have multiple file bases for each os.If you use wad or pak (both easy formats to use), you wouldn''t need to rewrite code (assuming you use standard functions for reading) or repack files.

 Just something to think about



----------
meh

Share this post


Link to post
Share on other sites