hdk
hdk copied to clipboard
webp color swap
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.
I'm seeing the same thing