ARImageSynthesizer

FREEMIUM
Por ArdicAITeam | Actualizada לפני חודשיים | Artificial Intelligence/Machine Learning
Popularidad

9.1 / 10

Latencia

130ms

Nivel de servicio

100%

Health Check

N/A

Volver a todas las conversaciones

How to display the image in html img tag?

Rapid account: Usmanugly
usmanugly
לפני שנה
  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 לפני שנה

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

Únase a la conversación, añada un comentario a continuación:

Inicie sesió/Regístrese para publicar nuevos comentarios