You are using same image format to save it to stream for all the different format of images that came into you.
For now just replace
bitmap.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
with
bitmap.Save(Response.OutputStream, img.RawFormat);
RawFormat: will get the current file format of this Image.
N.B: You don't need to create a new bitmap that don't need any conversion. you can directly save it to stream from System.Drawing.Image img