mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-07 07:56:07 +02:00
* Merge winforms framework content to working branch (#14) * Breadcrumb / TOC / Move net5 to net folder (#15) * change path from net5 to net * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Add .net 5 winforms placeholder article (#16) * added some metadata and adjusted net5 placeholder * corrections * corrections * corrections * Test1 * Swapping landing page vs concept * fix links * Fix links * Fix desc
1.4 KiB
1.4 KiB
title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | ||||
|---|---|---|---|---|---|---|---|---|
| How to: Convert a BMP image to a PNG image | 03/30/2017 |
|
|
9d4a692d-73ac-4ce3-9e05-9ec321e8fbd6 |
How to: Convert a BMP image to a PNG image
Oftentimes, you will want to convert from one image file format to another. You can do this conversion easily by calling the xref:System.Drawing.Image.Save%2A method of the xref:System.Drawing.Image class and specifying the xref:System.Drawing.Imaging.ImageFormat for the desired image file format.
Example
The following example loads a BMP image from a type, and saves the image in the PNG format.
[!code-csharpUsingImageEncodersDecoders#4] [!code-vbUsingImageEncodersDecoders#4]
Compiling the Code
This example requires:
-
A Windows Forms application.
-
A reference to the
System.Drawing.Imagingnamespace.