我正在尝试将许多(1000+)图像从 tiff 转换为 jpg,但在 appr. 250-300 张图像,任何进一步的图像大约需要 5-10 秒,即使前 250 张需要 20 秒。
这是我使用的代码:
foreach (string filePath in Directory.GetFiles(tifPath, "*.tif", SearchOption.AllDirectories))
{
System.Drawing.Image.FromFile(filePath).Save(jpgPath + "\\" + Path.GetFileNameWithoutExtension(filePath) + ".jpg", ImageFormat.Jpeg);
}
我的方法有问题吗?提前致谢。