Solved
Convert base64 code to image
Hi all,
In the code above, I converted a data from MySQL into base64encodeString. Next, I want to convert this string into an image to display on Mashup.
Any help is appreciated.
Thanks!
Hi all,
In the code above, I converted a data from MySQL into base64encodeString. Next, I want to convert this string into an image to display on Mashup.
Any help is appreciated.
Thanks!
Hello,
Please let me know if this is what you need:
var input = "0x89504E470D0A1A0A0000000D4948445200000020000000200802000000FC18EDA30000000173524\
74200AECE1CE90000000467414D410000B18F0BFC61050000000970485973000012740000127401DE661F78000000C\
949444154484BEDD3C10DC230104451D7E5825C4FAA713329C608C9875D67767656825BE64402FA0F92D0D69FF702E\
964608E6636E63E9D4E057CBFF5EBDE6F641381A35F1034E0D1D70509007D595000DBEF7DBF500501B0FD31CD9124E\
480EFBB63454881B3BFEEAB749532E0D1AF0A0900FA458103B01F9E86A340182A080CB099E352E802016C848E0A316\
06F6532268440A14F850828F5991000CAA3EEBE43286040E98B0204B4BE262040FBEDDFB927197F12007A9FFE17F70\
050E80B02BEC93FDC0B245BEB0314878ED55E0206490000000049454E44AE426082";
var binaryString = "";
for (var i = 2; i < input.length; i += 2) {
binaryString += String.fromCharCode(
parseInt(
input.substr(i, 2),
16
)
);
}
var result = base64EncodeString(binaryString);
Note that:
/ Constantine
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.