I learned at home yesterday and found that many people converted BMP images into other image formats. Some of them are easy to write and some are complicated to write.
Insus. NET is thinking that it has been uploading, downloading, or cropping files, and has been saving files in another way. You must also specify the ContentType when saving files in another way. You can find related methods in MSDN: http://msdn.microsoft.com/en-us/library/system.drawing.image (v = vs.110). aspx:
Okay, let's write a method:
To see the effect, Insus. NET, for example, creates an Action for the controller of the ASP. net mvc program,
Prepare a bmp image:
In the view, the bmp image is displayed first, and then click the button to display the converted jpeg image: