I\'m trying to use this class but I\'m getting a Generic error occured in GDI+ in Image.Save() method. From what I read it\'s some stream I need to close but I don\'t know which
Unless your program is running as administrator you can not save directly to the root of C:
make a folder and save it inside there instead.
Have you tested saving the images in different locations?
If it is still failing then without knowing exactly what is going on in your code I would hazard a guess to say that the original image is getting disposed somewhere before it should be. That's usually the most common cause of the error.
I've written a library that handles many different imaging operations whilst ensuring that memory is correctly handled. It's well tested and very simple to use.
You can get it here. http://imageprocessor.org/
Example code using the library:
using (ImageFactory imageFactory = new ImageFactory())
{
// Load, resize, set the quality and save an image.
imageFactory.Load(@"C:\a.jpg")
.Resize(new Size(50, 100))
.Quality(90)
.Save(@"C:\myimage.jpeg);
}