This was related to the fact that the file was encoded before passing it to System.Drawing.Bitmap. As I needed the file name to be encoded to be dropped in the HTML returned, I encoded it a little bit too fast. The orignal name should be used as is for System.Drawing.Bitmap. Then, I can encode it for the HTML code to be returned.