2

I have a bitmap for an image returned from api like ,what I get from api is a bitmap and not a base64 encoded string.

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAAAAAAAAAAAAAAA8P8PAAAAAAAAAAAAAADA//8DAAAAAAAAAAAAAAD8/z8AAAAAAAAAAAAAAGAAAAYAAAAAAAAAAAAAAAYAYAAAAAAAAAAAAAAAOAAAHAAAAAAAAAAAAACAAwDAAQAAAAAAAAAAAAAcAAAxAAAAAAAAAAAAAMABABADAAAAAAAAAAAAAH4A/GMAAAAAAAAAAAAA4AfAPwYAAAAAAAAAAAAAxgAfZwAAAAAAAAAAAABgDPBxBgAAAAAAAAAAAACDAzHOAAAAAAAAAAAAADA4EOMMAAAAAAAAAAAAgAHGYIIBAAAAAAAAAAAAGGAMJhgAAAAAAAAAAACAAXzAggEAAAAAAAAAAAAYwAcsGAAAAAAAAAAAAMAAPIADAwAAAAAAAAAAAAzAAzgwAAAAAAAAAAAAwADmgAEDAAAAAAAAAAAADGAOGDAAAAAAAAAAAADAgIPBAAMAAAAAAAAAAAAMOBgMMAAAAAAAAAAAAMDgADcAAwAAAAAAAAAAAAwOcAMwAAAAAAAAAAAAwMAAHAADAAAAAAAAAAAADAzAATAAAAAAAAAAAADAgAA/AAMAAAAAAAAAAAAMCPADMAAAAAAAAAAAAIABA2GAAQAAAAAAAAAAABgwEAYYAAAAAAAAAAAAgAGGwYEBAAAAAAAAAAAAGGAYHBgAAAAAAAAAAAAAA+wAwwAAAAAAAAAAAAAwwA4wDAAAAAAAAAAAAAAGOABuAAAAAAAAAAAAAGCAA+AGAAAAAAAAAAAAAAYQAHgAAAAAAAAAAAAAYAABgAcAAAAAAAAAAAAADAAAMAAAAAAAAAAAAADAAAAAAwAAAAAAAAAAAAA4AAAcAAAAAAAAAAAAAIADAMABAAAAAAAAAAAAAGAAAAYAAAAAAAAAAAAAAAYAYAAAAAAAAAAAAAAAwP//AwAAAAAAAAAAAAAA/P8/AAAAAAAAAAAAAAAA//8AAAAAAAAAAAAAAADw/w8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

How can I convert it to base64 for converting to image using angular2.Any help would be appreciated.

5
  • I want to do something like this stackoverflow.com/questions/10889764/… using javascript. Commented Apr 20, 2017 at 6:15
  • Possible duplicate of Embedding Base64 Images Commented Apr 20, 2017 at 6:17
  • No I dont get a base64 image from api I want to convert this to base64 and then to image. Commented Apr 20, 2017 at 6:18
  • try btoa() function to convert it to base64 Commented Apr 20, 2017 at 6:37
  • no it didnt work :( Commented Apr 20, 2017 at 9:05

1 Answer 1

2

This is not a bitmap Image. This seems like a base 64. If image is not drawing, try to get corrected base64 string from backend

Sign up to request clarification or add additional context in comments.

2 Comments

No we are getting bitmap only from backend.
Ok. This may be what you got form the backend, But this is no BitMap. Bitmap is a byte array

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.