-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResizeJob.cs
More file actions
35 lines (31 loc) · 950 Bytes
/
Copy pathResizeJob.cs
File metadata and controls
35 lines (31 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.Collections.Generic;
using System.IO;
namespace DropResize
{
public class ResizeJob
{
private static readonly HashSet<string> SupportedExtensions = new HashSet<string>
{
".jpg",
".jpeg",
".png",
".bmp",
".gif",
".tif",
".tiff"
};
public ResizeJob(string inputPath, ResizeProfile profile, string outputFolder)
{
InputPath = inputPath;
Profile = profile;
OutputFolder = outputFolder;
}
public string InputPath { get; private set; }
public ResizeProfile Profile { get; private set; }
public string OutputFolder { get; private set; }
public static bool IsSupportedInputFile(string path)
{
return File.Exists(path) && SupportedExtensions.Contains(Path.GetExtension(path).ToLowerInvariant());
}
}
}