This seems to be a bit of an infamous error all over the web. So much so that I have been unable to find an answer to my problem as my scenario doesn\'t fit. An exception ge
For me I was using the Image.Save(Stream, ImageCodecInfo, EncoderParameters)
and apparently this was causing the infamous A generic error occurred in GDI+
error.
I was trying to use EncoderParameter
to save the jpegs in 100% quality. This was working perfectly on "my machine" (doh!) and not on production.
When I used the Image.Save(Stream, ImageFormat)
instead, the error disappeared! So like an idiot I continued to use the latter although it saves them in default quality which I assume is just 50%.
Hope this info helps someone.