+ [task#127424] add displayColoredImage function of think3c widget.

This commit is contained in:
wangzemei
2024-09-05 16:39:53 +08:00
committed by 刘刚
parent a21f661abf
commit 4dfe37664d
+11
View File
@@ -226,3 +226,14 @@ function colorRegions(binaryImageData)
};
});
}
function displayColoredImage(coloredImageData)
{
const canvas = $('#canvas')[0];
const ctx = canvas.getContext('2d');
const img = new Image();
img.src = coloredImageData;
img.onload = function(){ctx.drawImage(img, 0, 0);};
}