ImageFormatConverter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ImageFormatConverter is a class that can be used to convert ImageFormat objects from one data type to another. Access this class through the TypeDescriptor object.
public ref class ImageFormatConverter : System::ComponentModel::TypeConverter
public class ImageFormatConverter : System.ComponentModel.TypeConverter
type ImageFormatConverter = class
inherit TypeConverter
Public Class ImageFormatConverter
Inherits TypeConverter
- Inheritance
Remarks
A type converter is used to convert values between data types. A type converter also supports property configuration at design time by providing text-to-value conversion or a list of values that users can select from. Access the ImageFormatConverter class through the TypeDescriptor class by calling the GetConverter method.
The ImageFormatConverter converts to and from known image formats, as specified in the ImageFormat class.
Note
If you want to convert between image formats, such as converting between BMP and JPEG, use one of the Image.Save methods that takes an ImageFormat object as a parameter.
Constructors
| Name | Description |
|---|---|
| ImageFormatConverter() |
Initializes a new instance of the ImageFormatConverter class. |
Methods
| Name | Description |
|---|---|
| CanConvertFrom(ITypeDescriptorContext, Type) |
Indicates whether this converter can convert an object in the specified source type to the native type of the converter. |
| CanConvertTo(ITypeDescriptorContext, Type) |
Gets a value indicating whether this converter can convert an object to the specified destination type using the context. |
| ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) |
Converts the specified object to an ImageFormat object. |
| ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) |
Converts the specified object to the specified type. |
| GetStandardValues(ITypeDescriptorContext) |
Gets a collection that contains a set of standard values for the data type this validator is designed for. Returns |
| GetStandardValuesSupported(ITypeDescriptorContext) |
Indicates whether this object supports a standard set of values that can be picked from a list. |