public static void MakeThumb(string srcimageUrl, string fileName, ThumbImage thumbSize) { using (Image img = MakeThumb(Bitmap.FromFile(srcimageUrl), new Size(thumbSize.Width, thumbSize.Height))) { fileName = Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "/"), thumbSize.ImageFoler), fileName); if (!Directory.Exists(Path.GetDirectoryName(fileName))) { Directory.CreateDirectory(Path.GetDirectoryName(fileName)); } img.Save(fileName); } }