如何从 jpg 图像中删除嵌入的颜色配置文件?

Bri*_*ian 7 c# jpeg image color-profile

我有一张 jpeg 照片,里面似乎有滤镜。根据我使用的查看器,图像看起来比应有的更暗。我没有意识到 jpeg 可以包含类似的东西,但看起来它必须包含。

原来的: 原始图像

调整大小(注意它更暗): 调整图像大小

在 C# 中调整图像大小时,如何删除或忽略过滤器?我也不介意解释这是如何发生的。该图像是由用户提供的,但我不知道这个过滤器是如何添加到其中的(我没有意识到 jpeg 格式支持类似的东西)。

U. *_*ndl 1

使用该命令exiftool执行的命令将是exiftool -ICC_Profile= photo.jpg

实际上,在这样做之前,我确实使用命令在删除之前提取了配置文件(exiftool 会创建备份)exiftool -icc_profile -b -w icc photo.jpg。那会创建photo.icc. 检查使用exiftool photo.icc表明该配置文件是宽色域

...
display profile (AdobeRGB):
Profile CMM Type                : KCMS
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1998:12:01 18:58:21
Profile File Signature          : acsp
Primary Platform                : Microsoft Corporation
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : KODA
Device Model                    : ROMM
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82487
Profile Creator                 : KODA
Profile ID                      : 0
Profile Copyright               : Copyright (c) Eastman Kodak Company, 1999, all rights reserved.
Profile Description             : ProPhoto RGB
Media White Point               : 0.9642 1 0.82489
...
Red Matrix Column               : 0.79767 0.28804 0
Green Matrix Column             : 0.13519 0.71188 0
Blue Matrix Column              : 0.03134 9e-005 0.82491
Device Mfg Desc                 : KODAK
Device Model Desc               : Reference Output Medium Metric(ROMM)
...
Run Code Online (Sandbox Code Playgroud)

然而,在大多数情况下,删除轮廓并不会让它看起来更好;正确的方法是对图像数据应用配置文件校正(例如将其从 Adob​​eRGB 转换为 sRGB)。也许您想看看如何使用 ICC 配置文件对一组任意像素值(而不是图像数据结构)执行颜色转换?

一般来说,具有 Adob​​eRGB 配置文件的照片在非广色域显示器 (sRGB) 上看起来有点暗淡,并且某些程序无法正确应用配置文件(例如 Windows 7 内置图像查看器)。一般来说,除非使用 ICCv4 配置文件(正在进行中),否则 Firefox 会做得很好。

但正如您所要求的(以及为了让人们看到差异与否),这是没有个人资料的照片(顺便说一句:我用广色域显示器查看了您的图像,所以第一张看起来不错): 在此输入图像描述