Question

I have an xml file with a string that is supposed to be an encoded .bmp file. However I am unable to find out what kind of coding this is (xml document sais its UTF-8, but it doesn't look like).

Here a piece of the string:

Qk1OHQAAAAAAAD4AAAAoAAAAKAEAALoAAAABAAEAAAAAAAAAAADEDgAAxA4AAAIAAAACAAAAAAAA////////////////////////////////////////////////////////AAAA//////////////// /////////////////////////////////wAAAP////////////////////////////////////// //////////8AAAD

or later in the string:

AAAA/////f/v9/9//v/////v+///e//////7////+B////P//////wAAAP////7/9/v/v/7/ ////9/v//7v//////f///4f////8//////8AAAD

I would very much appreciate any hint as to what kind of coding is this or even how to convert it back to a .bmp file?

Was it helpful?

Solution

To expand on @Shyam's comment. This is likely base64 encoded. So what you need to do is copy and paste just the xml content related to the encoded string. Then put it into a file, called base64Input

base64 -d < base64Input > base64Output

The base64Output will be your bmp image file which you can view. Even better if the bmp is part of a webpage you can simply base64 decode the entire xml/webpage then view in web browser then grab out the bmp image.

The base64 command is available usually by default on linux. If you are running windows, then you can download a base64 encoder/decoder. The -d flag specifies that you want to decode the specified file. My initial filenames were confusing, so I have edited the filenames to make more sense base64Input and base64Output. The < and > are the standard redirection operations. The base64 command will read the base64Input file and output the decoded result to the base64Output file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top