【发布时间】:2015-08-19 06:50:21
【问题描述】:
我的要求是多读取50个EPS文件并导出EPS的属性/颜色模式,这可能吗?颜色模式为灰度、RGB 和 CMYK。到目前为止,我尝试使用 BitmapImage 来读取 EPS,但我没有得到运气。 BitmapImage 不读取 EPS,因为它是矢量格式(我在堆栈溢出的某处读取)。谁能帮我阅读EPS文件并显示图像的格式,即图像的颜色?我尝试了一些代码请温柔我是编程世界的初学者......
C#
string imageloc = @"D:\Image";
string[] files = Directory.GetFiles(imageloc);
foreach (string file in files)
{
BitmapImage source = new BitmapImage(new System.Uri(file));
int bitsPerPixel = source.Format.BitsPerPixel;
Console.Write("File Scanning--> " + file + "property is" +bitsPerPixel+"\n");
}
可能猜到使用 imagemagick 读取文件格式?
【问题讨论】:
标签: c# asp.net imagemagick ghostscript eps