private TempFile MakeTempJPGImage(int width, int height) { var file = TempFile.WithExtension(".jpg"); File.Delete(file.Path); using (var x = new Bitmap(width, height)) { x.Save(file.Path, ImageFormat.Jpeg); } return file; }