Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing Images

Status
Not open for further replies.

jesarg

Programmer
Sep 1, 2006
4
US
If I have a WinForms application, and I want to store an image in the project, but

- I don't want to bloat the executable (imbed the image there)
- I don't want the image to be an external file (for safety, so other programs can't easily change it)

What are my best other options?
 
There are resource editors which can extract your image from an assembly. Then you can edit the image and using the same resource editor, you can embed it back (replace) the image into the assembly...

You could have a list of hash values for all sensitive images and upon loading, verify the stored hash value of "CompanyLogo.jpg" (for example) with the computed value of that file. If they don't match... someone has been tampering with it.
 
Why don't you just encyrypt the file and save it in a data directory? If you want to get really fancy about it, encrypt the file, then turn it into a zip file so its compressed, and then give it a funny extension so it is unrecognizable to regular people.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top