我怎样才能的RGB格式的上传的图片转换为CMYK格式,在.net中?格式、转换为、上传、图片

2023-09-03 22:12:08 作者:。空城空人梦,

我在CMYK格式转换和保存图像的要求。当我已经上传的RGB格式的图像,然后我需要将其转换为CMYK。是否有可能在.net中?谢谢

I have a requirement for converting and saving an image in CMYK format. When i have uploaded an image of RGB format, then i need to convert it to CMYK. Is it possible in .Net? Thanks

推荐答案

您可以做到这一点与ImageMagick的对于.NET,叫的 Magick.Net 。您可以通过的NuGet安装,而且是免费的。

You can do this with ImageMagick for .Net, called Magick.Net. You can install it via Nuget, and it's free.

色彩配置文件转换为pretty的混乱中Magick.Net。你可能不知道,如果是 magick.TransformColorSpace ,或基于一些基于命令行的答案, magick.Negate() 。但是,这两者都不是。相反,你的添加现有ColorProfile,感觉不对,然后添加你要转换为一个,Magick.Net在后台处理的转换,为您详细介绍。

Color profile conversion is pretty confusing in Magick.Net. You might wonder if it's magick.TransformColorSpace, or based on some command-line based answers, magick.Negate(). But it's neither. Instead you "Add" the existing ColorProfile, which feels wrong, then Add the one you want to convert to, and Magick.Net handles the details of the conversion in the background for you.

// Tell ImageMagick this is RGB
magick.AddProfile(ColorProfile.SRGB);
// Tell it to convert it.
magick.AddProfile(ColorProfile.USWebCoatedSWOP);

参见的https://magick.$c$cplex.com/ WIKIPAGE?标题=转换%20image

此,CMYK为RGB的倒数,在这里回答。