arun hs
arun hs

Reputation: 11

How to decode a Base64 encoded image string and how to display that bitmap after decoding in MFC

I'm trying to develop a WinCE Pocket PC application I have to take bitmap images from an SQL server from a web service in base64 encoded data and I want to decode that base64 encoded string and then by using that decoded result I want to create or display bitmap image in my dialog box picture control. I need to do all these things in MFC, I'm using VC++ MFC SmartDevice Project.

Upvotes: 1

Views: 1612

Answers (1)

ctacke
ctacke

Reputation: 67178

Base64 encoding and decoding can be done by using one of the many free resources online. Here's one that looks simple enough. If shows decoding a buffer, which is probably what you have retrieved from the service.

That will decode it to another buffer, which is now a Bitmap. Displaying that on the Window is typically (though you could certainly go myriad other ways) done with a CStatic instance.

Upvotes: 0

Related Questions