3

我正在寻找支持 CMYK(JPG 或 TIF)的图形库。我必须读取一个大图像文件和一个小图像文件,然后先写第二个。输出也必须是 CMYK(没有任何 CMYK->RGB 转换)。有吗?(C#/C++/Java 或其他)

4

1 回答 1

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);
   }
}
于 2010-10-27T19:26:14.963 回答