ImageFrame Class
Represents an image frame.
public sealed class ImageFrame : IDisposable
Public NotInheritable Class ImageFrame
Implements IDisposable
- Inheritance:
- System.ObjectImageFrame
Implements
Properties
DpiX
Gets the horizontal dots per inch (dpi) of the frame or System.Double.NaN.
Property Value
- System.Double
The horizontal dots per inch (dpi) of the frame; that is, the dots per inch (dpi) along the x-axis.
DpiY
Gets the vertical dots per inch (dpi) of the frame or System.Double.NaN.
Property Value
- System.Double
The vertical dots per inch (dpi) of the frame; that is, the dots per inch (dpi) along the y-axis.
Height
Gets the height of the frame in pixels.
Property Value
- System.Int32
The height of the frame in pixels.
Metadata
Gets the metadata of the frame.
public ImageFrameMetadata Metadata { get; }
Public ReadOnly Property Metadata As ImageFrameMetadata
Property Value
The metadata of the frame.
Width
Gets the width of the frame in pixels.
Property Value
- System.Int32
The width of the frame in pixels.
Methods
ApplyFilter(Action<FilterBuilder>)
Applies a filter.
public void ApplyFilter(Action<FilterBuilder> configureFilter)
Public Sub ApplyFilter(configureFilter As Action(Of FilterBuilder))
Parameters
configureFilter
- System.Action<FilterBuilder>
A delegate to configure the filter.
Crop(Int32, Int32, Int32, Int32)
Crops the image to the given position and size.
public void Crop(int x, int y, int width, int height)
Public Sub Crop(x As Integer, y As Integer, width As Integer, height As Integer)
Parameters
x
- System.Int32
The horizontal position of cropping.
y
- System.Int32
The vertical position of cropping.
width
- System.Int32
Width of the crop area.
height
- System.Int32
Height of the crop area.
Dispose()
Releases all resources used by the frame.
Resize(Nullable<Int32>, Nullable<Int32>)
Resizes the frame to the given size.
public void Resize(int? width, int? height)
Public Sub Resize(width As Integer?, height As Integer?)
Parameters
width
- System.Nullable<System.Int32>
Target width of the resulting frame. If null then this will be calculated by aspect ratio.
height
- System.Nullable<System.Int32>
Target height of the resulting frame. If null then this will be calculated by aspect ratio.
Exceptions
- System.ArgumentNullException
Thrown when width
and height
are both null.
RotateFlip(RotateFlipType)
Rotates and flips the frame by the given enum.
public void RotateFlip(RotateFlipType rotateFlipType)
Public Sub RotateFlip(rotateFlipType As RotateFlipType)
Parameters
rotateFlipType
- RotateFlipType
The rotate flip type to perform rotation and flipping.