我正在寻找支持CMYK(JPG或TIF)的图形库。我必须先阅读一个大图像文件和一个小文件,然后再写第二个。输出必须也是CMYK(没有任何CMYK-> RGB转换)。有什么? (C#/ C ++ / Java或其他)
答案 0 :(得分:2)
(免责声明,我为Atalasoft工作) Atalasoft dotImage将以CMYK的形式读取和写入图像,并在CMYK空间中执行叠加操作。
您需要执行此操作的代码是:
public void OverlayCMYKOnCMYK(Stream bottomStm, Stream topStm, Point location, Steam outStm)
{
using (AtalaImage bottom = new AtalaImage(bottomStm, null), top = new AtalaImage(topStm, null)) {
// might want to check that both bottom and top have the same PixelFormat
// OverlayCommand will silently do conversions if they don't match.
OverlayCommand overlay = new OverlayCommand(top, location);
overlay.Apply(bottom);
bottom.Save(outStm, new TiffEncoder(), null);
}
}