优化代码

This commit is contained in:
BookerLiu
2023-04-12 15:19:19 +08:00
parent 058ed5016a
commit eba6d4770a

View File

@@ -205,7 +205,8 @@ namespace GeekDesk.Util
try try
{ {
FileInfo file = new FileInfo(filePath); 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); Image img = Image.FromFile(filePath);
if (img.Width <= tWidth && img.Height <= tHeight) if (img.Width <= tWidth && img.Height <= tHeight)