我使用 NetVips 从 bw 分色中创建 png 合成。伪代码如下所示:
List<NetVips.Image> sources = new List<NetVips.Image>()
sources.Add(NetVips.Image.Pngload(cFilePath, access: NetVips.Enums.Access.Sequential);
sources.Add(NetVips.Image.Pngload(mFilePath, access: NetVips.Enums.Access.Sequential);
sources.Add(NetVips.Image.Pngload(yFilePath, access: NetVips.Enums.Access.Sequential);
sources.Add(NetVips.Image.Pngload(kFilePath, access: NetVips.Enums.Access.Sequential);
destination = sources.First()
sources.Remove(destination);
destination.Bandjoin(sources.ToArray());
destination = destination.Copy(bands: sources.Count, format: "uchar", interpretation: "cmyk").Cache(-1);
destination = destination.IccImport(intent: renderIntent, inputProfile: iccprofile);
destination.Pngsave(destinationPath);
这将根据分色和 iccprofile 创建 png。一切都很完美
但如果我只提供一个 K 分离
List<NetVips.Image> sources = new List<NetVips.Image>()
sources.Add(NetVips.Image.Pngload(kFilePath, access: NetVips.Enums.Access.Sequential);
destination = sources.First()
sources.Remove(destination);
destination.Bandjoin(sources.ToArray());
destination = destination.Copy(bands: sources.Count, format: "uchar", interpretation: "cmyk").Cache(-1);
destination = destination.IccImport(intent: renderIntent, inputProfile: iccprofile);
destination.Pngsave(destinationPath);
我遇到 VipsException:无法调用 icc_import icc_import:没有输入配置文件
有人可以建议如何使用 icc-profile 和一个 K 分隔创建 png 吗?
我对图像处理的了解有限。NetVips 提供了大量的可能性。为了提高我的专业知识:有人可以为链接或书籍提供一些建议吗?
谢谢维克