Compare commits

...

3 Commits

Author SHA1 Message Date
Vijaysinh
fdc8e229fc
Merge 184fc6adcb into a60b7b86c5 2026-01-08 11:49:23 +05:30
Vijaysinh
184fc6adcb
Merge branch 'master' into fix-loadimage-icc_based 2025-12-18 12:05:26 +05:30
Vijay2359
05683b8639 Fix:Apply Icc profile -> sRGB conversion in LoadImage 2025-12-10 18:24:42 +05:30

View File

@ -1662,6 +1662,25 @@ class LoadImage:
image_path = folder_paths.get_annotated_filepath(image)
img = node_helpers.pillow(Image.open, image_path)
import io
from PIL import ImageCms
try:
if "icc_profile" in img.info:
icc_bytes = img.info["icc_profile"]
src_profile = ImageCms.ImageCmsProfile(io.BytesIO(icc_bytes))
dst_profile = ImageCms.createProfile("sRGB")
img = ImageCms.profileToProfile(
img,
src_profile,
dst_profile,
outputMode="RGB"
)
except Exception as e:
print("Icc color profile conversion failed:",e)
output_images = []
output_masks = []