csdn产品小助手 2015-12-14 23:15 采纳率: 0%
浏览 15

数据URI颜色关闭

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)

Imgur

  • 写回答

0条回答 默认 最新

    报告相同问题?