Ann app I work on gets some of it icons from a serialised ImageList object in a .resx
file. This sucks to maintain because I can't edit or even see the images from Visual Studio.
How can I get the images back as files (PNGs or bitmaps)? Then I can use them instead and delete the pesky ascii resource.
<data name="imageList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
...
A///AAIACw==
</value>
</data>
(The full ascii text is hundreds of lines long)
I had somehow similar problem - but I needed to extract data like this:
<data name="barButtonItem.LargeGlyph" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
...
I've googled for "mime64 to binary file online", jumped from there into first mime64 decoder - for example like this: http://www.motobit.com/util/base64-decoder-encoder.asp
and then decoded mime64 to plain binary. Saved with .png extension - and voila - I have image now back.
I guess similar approach could be tried on on icons, but not sure if this will work on them. May be some sort of hex binary cut paste might be needed as well.
I've had the same problem and I found a handy solution here.
With ResXResourceReader you can read the file and enumerate it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With