Class Image
Describes an image to be drawn on a Graphics or displayed in a UI control.
[TypeConverter(typeof(ImageConverter))]
public class Image : HandledObject<IImageHandler>, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IImmutableObject, IDisposableObject, IDisposable, IBaseObject- Inheritance
- 
      
      
      
      
      
      
      
      
      Image
- Implements
- Derived
Constructors
- Image(IImageHandler)
- Initializes a new instance of the Image class. 
Fields
- DefaultSaveQuality
- Gets or sets default quality used when images are saved and quality parameter is omitted. 
- GrayScale
- Called from ToGrayScale(). Used to override default grayscale method. 
- UseSkiaSharpForLoading
- Gets or sets a value indicating whether to use SkiaSharp for loading images. Default is True. If this value is False, platform specific image loading will be used. 
Properties
- AsBrush
- Creates texture brush with this image. 
- AsGeneric
- Converts this object to GenericImage. 
- BitsFormat
- Gets ImageBitsFormat for this image. 
- Bounds
- Gets image bounds in pixels. This method returns (0, 0, Width, Height). 
- Canvas
- Gets Graphics which allows to draw on the image. Same as GetDrawingContext(). 
- DefaultBitmapType
- Gets default BitmapType value for the current operating system. 
- Depth
- Gets the color depth of the image. Returned value is 32, 24, or other. 
- DipSize
- Gets the size of bitmap in DPI-independent units. 
- ExtensionsForLoad
- Gets or sets list of extensions (including ".") which can be used to filter out supported image formats when using OpenFileDialog. 
- ExtensionsForSave
- Gets or sets list of extensions (including ".") which can be used to filter out supported image formats when using SaveFileDialog. 
- HasAlpha
- Gets or sets whether this image has an alpha channel. 
- HasMask
- Gets whether this image has mask. 
- Height
- Gets image height in pixels. 
- IsEmpty
- Gets whether image is empty (is disposed or has an empty width or height). 
- IsOk
- Gets whether image is ok (is not disposed and has non-zero width and height). 
- PixelHeight
- Gets image height in pixels. 
- PixelSize
- Gets the size of the image in pixels. 
- PixelWidth
- Gets image width in pixels. 
- ScaleFactor
- Gets or sets the scale factor of this image. 
- ScaledHeight
- Gets the height of the bitmap in logical pixels. 
- ScaledSize
- Gets the size of the bitmap in logical pixels. 
- ScaledWidth
- Gets the width of the bitmap in logical pixels. 
- Size
- Gets image size in pixels. 
- Url
- Gets or sets source url of this image. This is informational property and doesn't reload the image. 
- Width
- Gets image width in pixels. 
Methods
- Assign(GenericImage)
- Assigns GenericImage to this image. 
- Assign(SKBitmap)
- Assigns SKBitmap to this image. 
- BoundsDip(AbstractControl)
- Gets image rect as (0, 0, SizeDip(control).Width, SizeDip(control).Height). 
- BoundsDip(double)
- Gets image rect as (0, 0, SizeDip(scaleFactor).Width, SizeDip(scaleFactor).Height). 
- ChangeLightness(int)
- Creates new image using pixels of this image with changed lightness. 
- ClearCachedImages()
- Clears images cache used in FromUrlCached(string). 
- Clone()
- Creates a clone of this image with fully copied image data. 
- ConvertToDisabled(byte)
- Returns disabled (dimmed) version of the image. 
- Create(int, int, Color)
- Creates image with the specified size, filled with - color.
- Create(int, int, SKColor[])
- Creates image with the specified size and pixel data. 
- CreateHandler()
- Creates handler. 
- DisposeManaged()
- Override to dispose managed resources. Here we dispose all used object references. 
- FromAssemblyUrl(Assembly, string)
- Initializes a new instance of the Image class from the specified relative url and assembly. 
- FromBase64String(string)
- Creates an Image from a Base64-encoded string. 
- FromScreen()
- Creates images with screen pixels. 
- FromStream(Stream)
- Creates an Image from the specified data stream. 
- FromSvgStream(Stream, int, int, Color?)
- Initializes a new instance of the Image class from the specified Stream which contains svg data. 
- FromSvgString(string, int, int, Color?)
- Initializes a new instance of the Image class from the specified string which contains svg data. 
- FromSvgUrl(string, int, int, Color?)
- Initializes a new instance of the Image class from the specified url which points to svg file or resource. 
- FromSvgUrlForToolbar(string, IControl, Color?)
- Initializes a new instance of the Image class from the specified url which points to svg file or resource. 
- FromUrl(string, BitmapType)
- Initializes a new instance of the Image class from the specified url. Raises exceptions on errors. 
- FromUrlCached(string)
- Initializes a new instance of the Image class from the specified url. Do not raise exceptions on errors, just returns Null image. Uses image cache, so the bitmap with the same url is loaded faster for second time. 
- FromUrlOrNull(string)
- Initializes a new instance of the Image class from the specified url. Returns null if error occurs during image load. No exceptions are raised. 
- GetBitmapTypeFromFileName(string)
- Gets BitmapType from the extension of the - fileName.
- GetDrawingContext()
- Gets Graphics for this image on which you can paint. 
- GetSubBitmap(RectI)
- Returns a sub image of the current one as long as the - rectbelongs entirely to the image.
- InternalLoadFromStream(Stream, BitmapType)
- Loads image data from the specified stream. 
- IsNotNullAndOk(Image?)
- Indicates whether the specified image is not - nulland has non-empty width and height.
- IsNullOrEmpty(Image?)
- Indicates whether the specified image is - nullor has an empty width (or height).
- Load(Stream, BitmapType)
- Loads an image from an input stream. 
- Load(string, BitmapType)
- Loads an image from a file or resource. 
- LockSurface(ImageLockMode)
- Gets ISkiaSurface for this image. 
- Rescale(SizeI)
- Rescales this image to the requested size. 
- ResetAlpha()
- Resets alpha channel. 
- ResetGrayScaleCache()
- Resets the cached grayscale version of the image by disposing of it. 
- Save(Stream, ImageFormat, int?)
- Saves this image to the specified stream in the specified format. 
- Save(Stream, BitmapType, int?)
- Saves this image to the specified stream in the specified format defined in - type.
- Save(string, BitmapType, int?)
- Saves this Image to the specified file. 
- Save(string, int?)
- Saves this Image to the specified file. 
- SaveToDesktop(string?, bool)
- Saves the current image to the desktop with the specified file name. 
- SetDPI(SizeD)
- Sets ScaleFactor using DPI value. 
- SizeDip(AbstractControl)
- Gets the size of the image in device-independent units. 
- SizeDip(double)
- Gets the size of the image in device-independent units using the specified scale factor. 
- ToBase64String(BitmapType, int?)
- Converts this image to a Base64-encoded string in the specified format. 
- ToGrayScale()
- Converts the current image to a grayscale version. 
- ToGrayScaleCached()
- Returns a cached grayscale version of the image. If the cached version does not exist, it creates a new grayscale image and caches it. 
- ToString()
- Returns a string that represents the current object. 
- WithConvertedColors(Func<ColorStruct, ColorStruct>)
- Creates an new image from this image with all pixels converted using the specified function. 
- WithLightColors()
- Creates an new image from this image with all pixels lighter 
- WithLightLightColors()
- Creates an new image from this image with all pixels lighter (this method makes 2x lighter than WithLightColors()). 
Operators
- explicit operator Image(GenericImage)
- Converts the specified GenericImage to a Image. 
- explicit operator GenericImage(Image)
- Converts the specified GenericImage to a Image.