如何使用嵌入的 icc 颜色配置文件正确显示图像?

How to display correctly image with icc color profile embed?

在 delphi 东京,如果我尝试显示此图片:

https://chromachecker.com/include/img/web_browser/redtruck_GBR.jpg

在 Timage 中,它显示的不是蓝天而是 绿色 天空,如下所示:

如何在 delphi 中正确显示带有嵌入颜色配置文件的图片?

完整的答案和示例过于宽泛。但这是您需要做的粗略概述。将其视为进一步研究的起点。

  1. 获取图像的颜色配置文件。 EXIF 数据要么引用众所周知的配置文件,要么嵌入在图像元数据中。
  2. 获取屏幕的颜色配置文件GetICMProfile
  3. 加载屏幕和图像的颜色配置文件:OpenColorProfile
  4. 创建颜色变换:CreateMultiProfileTransform
  5. 翻译颜色:TranslateBitmapBits
  6. 清理:CloseColorProfileDeleteColorTransform