471,357 Members | 1,087 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,357 software developers and data experts.

How to retrieve a bitmap from a .resx file

Visual Studio 2003
Windows XP SP2

Problem: I have lost my original xyz.bmp file.

However it is still available in my app because they get copied into the
..resx file and stores as a base64 encoded string, probably encrypted as well
as there is a publickeytoken stored in the xml record.

My question is has anybody got a bit of code that will take that string or
the panel with the backgroundimage property set to that bitmap and save this
to a file as a .bmp again.
I am sure it can be done I just aint hacker enough to do it for myself.

Any help gratefully recieved
Chris

Jul 21 '05 #1
3 2044
Hi Chris
You can always, use the reflection namespace objects to retrieve images,
docs, and anything really that was imbedded into an assembly. I don't
remember exactly how to do it... but here isd an interesting artcle:

http://www.codeproject.com/dotnet/asmex.asp
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
Visual Studio 2003
Windows XP SP2

Problem: I have lost my original xyz.bmp file.

However it is still available in my app because they get copied into the
.resx file and stores as a base64 encoded string, probably encrypted as
well
as there is a publickeytoken stored in the xml record.

My question is has anybody got a bit of code that will take that string or
the panel with the backgroundimage property set to that bitmap and save
this
to a file as a .bmp again.
I am sure it can be done I just aint hacker enough to do it for myself.

Any help gratefully recieved
Chris

Jul 21 '05 #2
Felipe
Thanks for trying,

asmex will recreate the resource from an exe but not dig out the individual
bitmap from that resource.

Chris
Jul 21 '05 #3
I found a solution and here it is for anybody else with a similiar problem:

http://www.codeproject.com/dotnet/ResourceEditor.asp

Its a little tool that allows you to edit resource files etc. It integrates
with VS.2003 and all you do is open the resx file ( from within VS )
containing the missing .bmp double click the image in the display and it
loads the image editor. From there its just a "Save as" away from recovered

Thanks Filipe for putting me on the right line and double thanks to Gaston
for ResourceEditor.

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Carl Mercier | last post: by
reply views Thread by David Krussow | last post: by
reply views Thread by prabhupr | last post: by
5 posts views Thread by =?Utf-8?B?QXhlbCBEYWhtZW4=?= | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.