• Noel Gordon's avatar
    [piexwasm] Add embedded adobe color profile to JPEG images · ace9a10d
    Noel Gordon authored
    Add createImageDataArray_ helper and use it to convert the view to the
    final data: a new Uint8Array(view) as before, but if the image is JPEG
    and it has 'adobeRgb' color space, embed an adobe color profile in the
    returned JPEG image data.
    
    Remove a TODO: the using code in image_request_task.js no longer needs
    to manually color correct the image from adobe to sRGB when drawing to
    the <canvas>. The chrome <canvas> is color managed, and uses the color
    profile embedded in the image to perform color correction to sRGB.
    
    Bug: 1132695
    Change-Id: Iec21fb4021d8ab94a377f9fc682873854041bb87
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454591Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
    Commit-Queue: Noel Gordon <noel@chromium.org>
    Auto-Submit: Noel Gordon <noel@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#814552}
    ace9a10d
piex_loader.js 19.2 KB