is there some way to convert a base64 string into an image; in Visual C++? I got an image as a result of getting the image from an url, encoded as a base64 so, I need to get it back.
I’m really lost in this matter; I’m using Visual C++ 2010.
So far I’ve been digging about GDI+ but I don’t know if it is correct.
Thanks.
Convert into bytes, convert bytes into bitmap, (optional) bitblt bitmap onto window.
How do I base64 encode (decode) in C?
How can I create an Image in GDI+ from a Base64-Encoded string in C++?
You need to know what type of image the resulting bytes are. Then you need to find an algorithm that can understand that, or just save the bytes as a file type (if it is already built with header info and everything).
If it’s just a bitmap (like a MFC bitmap), you’ll need a way to convert that into an image, if you intend to save it. If you just intend to display it and it’s already a bitmap, then just use the GDI methods.