I have a question in regards to the code below. The code I have below successfully runs through a directory, and sets the resoultion of the picture to a smaller size. Howe
Found the problem. Thanks @yetapb for showing a cleaner version of the code, but that still didn't work. The answer to the problem was that I needed to explicity specify the type of file type that the image would be saved as. My guess is that because I did not specify the image format explicitly, the image compression was not handled accordingly.. A Bitmap was just saved with a smaller resolution with a '.jpg' slapped onto it, and not compressed accordingly. The following code now works.
files = System.IO.Directory.GetFiles(@"C:\PicFolder");
for (string file in files)
{
Bitmap tempBmp = new Bitmap(file);
Bitmap bmp = new Bitmap(tempBmp, 807, 605);
bmp.Save(
@"C:\NewPicFolder\Pic" + count + ".jpg",
System.Drawing.Imaging.ImageFormat.Jpeg);
count++;
}