0xDeCA10B icon indicating copy to clipboard operation
0xDeCA10B copied to clipboard

[demo] Show image for the original data when looking at refund/reward data for an image classifier

Open juharris opened this issue 3 years ago • 1 comments

I started to do this but the image wouldn't display. I was doing stuff like:

img = document.getElementById('input-image');

canvas = document.createElement('canvas');
context = canvas.getContext('2d');
canvas.width = img.width;
canvas.height = img.height;
context.drawImage(img, 0, 0 );

img2 = document.createElement("img");
img2.src = canvas.toDataURL();
document.body.appendChild(img2);

I was trying to save canvas.toDataURL() to the database of original data as text and then load it into an <img> tag. It wouldn't display.

juharris avatar Oct 22 '20 20:10 juharris

Could be an issue with how database is modifying/formatting the data text. Possible to try saving images in a different format like binary blob?

dem0nsl4yer avatar Apr 04 '23 08:04 dem0nsl4yer