gpt4 book ai didi

javascript - 将api返回的位图转换为angular2中的图像

转载 作者:行者123 更新时间:2023-11-29 21:07:03 24 4
gpt4 key购买 nike

我有一个从 api 返回的图像的位图,例如,我从 api 得到的是位图而不是 base64 编码的字符串。

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAAAAAAAAAAAAAAA8P8PAAAAAAAAAAAAAADA//8DAAAAAAAAAAAAAAD8/z8AAAAAAAAAAAAAAGAAAAYAAAAAAAAAAAAAAAYAYAAAAAAAAAAAAAAAOAAAHAAAAAAAAAAAAACAAwDAAQAAAAAAAAAAAAAcAAAxAAAAAAAAAAAAAMABABADAAAAAAAAAAAAAH4A/GMAAAAAAAAAAAAA4AfAPwYAAAAAAAAAAAAAxgAfZwAAAAAAAAAAAABgDPBxBgAAAAAAAAAAAACDAzHOAAAAAAAAAAAAADA4EOMMAAAAAAAAAAAAgAHGYIIBAAAAAAAAAAAAGGAMJhgAAAAAAAAAAACAAXzAggEAAAAAAAAAAAAYwAcsGAAAAAAAAAAAAMAAPIADAwAAAAAAAAAAAAzAAzgwAAAAAAAAAAAAwADmgAEDAAAAAAAAAAAADGAOGDAAAAAAAAAAAADAgIPBAAMAAAAAAAAAAAAMOBgMMAAAAAAAAAAAAMDgADcAAwAAAAAAAAAAAAwOcAMwAAAAAAAAAAAAwMAAHAADAAAAAAAAAAAADAzAATAAAAAAAAAAAADAgAA/AAMAAAAAAAAAAAAMCPADMAAAAAAAAAAAAIABA2GAAQAAAAAAAAAAABgwEAYYAAAAAAAAAAAAgAGGwYEBAAAAAAAAAAAAGGAYHBgAAAAAAAAAAAAAA+wAwwAAAAAAAAAAAAAwwA4wDAAAAAAAAAAAAAAGOABuAAAAAAAAAAAAAGCAA+AGAAAAAAAAAAAAAAYQAHgAAAAAAAAAAAAAYAABgAcAAAAAAAAAAAAADAAAMAAAAAAAAAAAAADAAAAAAwAAAAAAAAAAAAA4AAAcAAAAAAAAAAAAAIADAMABAAAAAAAAAAAAAGAAAAYAAAAAAAAAAAAAAAYAYAAAAAAAAAAAAAAAwP//AwAAAAAAAAAAAAAA/P8/A AAAAAAAAAAAAAAAAAA//8AAAAAAAAAAAAAAAAADw/w8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA酒店本酒店

如何将其转换为 base64 以使用 angular2 转换为图像。我们将不胜感激。

最佳答案

这不是位图图像。这看起来像是 base 64。如果图像未绘制,请尝试从后端获取更正的 base64 字符串

关于javascript - 将api返回的位图转换为angular2中的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43511575/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com