I've got a blob of an image that is stored in an Oracle database, I need to take the blob and display it as an image on a web page. To grab the blob, I'm doing an AJAX call like this:
$.ajax({
type: 'GET',
url: '/rest/api/summaryWithPicture/001',
crossDomain: true,
dataType: 'json',
success: function(result) {
var dataURI = result.picture.pictureThumbnail;
$(".profileImage").attr("src", "data:image/jpeg;base64," + dataURI);
}
});
This displays the image, however the colors are wrong. The image below shows the original picture (left) next to what is displayed on the web page (right)
