浏览代码

✅ 优化代码

BookerLiu 2 年之前
父节点
当前提交
eba6d4770a
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Util/ImageUtil.cs

+ 2 - 1
Util/ImageUtil.cs

@@ -205,7 +205,8 @@ namespace GeekDesk.Util
             try
             {
                 FileInfo file = new FileInfo(filePath);
-                if (file.Exists && file.Length > 0)
+                if (file.Exists && file.Length > 0 
+                    && !System.IO.Path.GetExtension(filePath).Contains("psd"))
                 {
                     Image img = Image.FromFile(filePath);
                     if (img.Width <= tWidth && img.Height <= tHeight)