### What did you do? Called PIL.Image.Image.convert(mode='LAB') for an RGB image ```python img = PIL.Image.open('filename.png').convert(mode='LAB') ``` ### What did you expect to happen? Conversion of data to LAB colourspace. ### What actually happened? ValueError: conversion from RGB to LAB not supported The following code did work: ```python rgb_lab_transform = PIL.ImageCms.buildTransformFromOpenProfiles(PIL.ImageCms.createProfile('sRGB'), PIL.ImageCms.createProfile('LAB'), 'RGB', 'LAB') img = PIL.ImageCms.applyTransform(Image.open('filename.png').convert(mode='RGB'), rgb_lab_transform) ``` ### What are your OS, Python and Pillow versions? * OS: Linux, kernel 5.15.32-gentoo-r1 * Python: 3.10.6 * Pillow: 9.2.0
Activity
radarhere commentedon Oct 7, 2022
I've created PR #6647 to resolve this.
[-]convert(mode='LAB') fails for RGB[/-][+]convert("LAB") fails for RGB[/+]