ImageConverter
System.Drawing.ImageConverter
Namespace: System.Drawing
Assembly: System.Drawing.Managed (4.0.0.0)
Provides a type converter to convert Image objects to and from various other representations. This class supports conversion from byte arrays to Image objects and vice versa.
public class ImageConverter : TypeConverterPublic Class ImageConverter
Inherits TypeConverterConstructors
ImageConverter()
Initializes a new instance of ImageConverter.
Methods
CanConvertFrom(context, sourceType)
Determines whether this converter can convert an object of the specified type to an Image, using the specified context.
Returns: Boolean. if the conversion is possible; otherwise, .
CanConvertTo(context, destinationType)
Determines whether this converter can convert an Image to the specified type, using the specified context.
Returns: Boolean. if the conversion is possible; otherwise, .
ConvertFrom(context, culture, value)
Converts the given object to an Image object, using the specified context and culture information.
Returns: Object. An Image object, or if the conversion cannot be performed.
Throws:
NotSupportedException Thrown if the conversion cannot be performed.
ConvertTo(context, culture, value, destinationType)
Converts the given Image object to another type, using the specified context and culture information.
Returns: Object. The converted object.
Throws:
NotSupportedException Thrown if the conversion cannot be performed.
GetProperties(context, value, attributes)
Retrieves the set of properties for the Image type. By default, this method returns the properties of the Image type.
Returns: PropertyDescriptorCollection. A PropertyDescriptorCollection containing the properties of the Image type.
GetPropertiesSupported(context)
Determines whether this object supports properties. This implementation always returns .
Returns: Boolean. if properties are supported; otherwise, .
Last updated
Was this helpful?