ARImageSynthesizer

FREEMIUM
От ArdicAITeam | Обновлено 2달 전 | 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
일 년 전
  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

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии