0
在Windows窗体应用程序,我试图打开图像(CMYK TIFF),添加文字,然后保存回CMYK TIFF图像,但是当我打开在Photoshop中输出图像,它是RGB图像(颜色看起来不同于输入图像)。以下是代码,我很感激你能否帮助我。Image.Save问题(保存CMYK图像CMYK图像)
Image^ chartImg = Image::FromFile("user_chart.tif");
Graphics^ g = System::Drawing::Graphics::FromImage(chartImg);
String^ drawString = "Test test test test";
System::Drawing::Font^ drawFont = gcnew System::Drawing::Font("Arial", 9);
System::Drawing::SolidBrush^ drawBrush = gcnew
System::Drawing::SolidBrush(System::Drawing::Color::Black);
float x = 100.0F;
float y = 10.0F;
System::Drawing::StringFormat^ strFormat = gcnew System::Drawing::StringFormat();
g->DrawString(drawString, drawFont, drawBrush, x, y, strFormat);
chartImg->Save("user_chart2.tif", System::Drawing::Imaging::ImageFormat::Tiff);
根据nobugz,现在有一个CMYK编码器/解码器。我没有自己尝试过。我会坚持使用LibTIFF和LittleCMS。 – 2009-11-20 22:01:08