hdk icon indicating copy to clipboard operation
hdk copied to clipboard

webp color swap

Open wolffiex opened this issue 1 year ago • 1 comments

Creating webp images with cwebp lossless it appears that color information is interpreted incorrectly. The following code takes an image that displays correctly in my web browser and makes it display correctly on my device

def swap_palette(frame):
    r, g, b = frame.convert("RGB").split()
    return Image.merge("RGB", (b, r, g))

I don't think this is a problem with PIL as images I create with Preview on my mac and convert with cwebp have the same issue.

wolffiex avatar May 21 '24 15:05 wolffiex

I'm seeing the same thing

smith-kyle avatar May 29 '24 18:05 smith-kyle