ARImageSynthesizer

फ्रीमियम
द्वारा ArdicAITeam | अपडेट किया गया 2 mesi fa | Artificial Intelligence/Machine Learning
लोकप्रियता

9.1 / 10

लेटेंसी

135ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

How to display the image in html img tag?

Rapid account: Usmanugly
usmanugly
un anno fa
  const response = await axios.request(options2);
  const b64Response = btoa(response.data);
  const outputImg = document.createElement("img");
  outputImg.src = "data:image/jpeg;base64," + b64Response;

  // append it to your page
  document.body.appendChild(outputImg);

doing it like this is not working for some reason

Rapid account: Ardic AI Team
ArdicAITeam Commented un anno fa

Hello,

There should be a space between “data:image/jpeg;base64,” and the actual base64 image data. Can you this;
outputImg.src = "data:image/jpeg;base64, " + b64Response;

Our apologies for the late response, if you already found the solution please share it with us!

Best regards,
ARDIC AI Team

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें