+ [task#127424] add displayColoredImage function of think3c widget.
This commit is contained in:
@@ -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);};
|
||||
}
|
||||
Reference in New Issue
Block a user