Files
docs-desktop/dotnet-desktop-guide/framework/winforms/advanced/how-to-determine-the-parameters-supported-by-an-encoder.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* 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
2020-09-01 16:26:21 -07:00

1.8 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Determine the Parameters Supported by an Encoder 03/30/2017
csharp
vb
encoder parameters [Windows Forms], determining supported
f47ae459-e3ce-4d41-a140-2f6c6aea3f44

How to: Determine the Parameters Supported by an Encoder

You can adjust image parameters, such as quality and compression level, but you must know which parameters are supported by a given image encoder. The xref:System.Drawing.Image class provides the xref:System.Drawing.Image.GetEncoderParameterList%2A method so that you can determine which image parameters are supported for a particular encoder. You specify the encoder with a GUID. The xref:System.Drawing.Image.GetEncoderParameterList%2A method returns an array of xref:System.Drawing.Imaging.EncoderParameter objects.

Example

The following example code outputs the supported parameters for the JPEG encoder. Use the list of parameter categories and associated GUIDs in the xref:System.Drawing.Imaging.Encoder class overview to determine the category for each parameter.

[!code-csharpUsingImageEncodersDecoders#3] [!code-vbUsingImageEncodersDecoders#3]

Compiling the Code

This example requires:

See also