Gembox.Imaging
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ImageFrame Class

    Namespace:
    GemBox.Imaging
    Assembly:
    GemBox.Imaging.dll

    Represents an image frame.

    • C#
    • VB.NET
    public sealed class ImageFrame : IDisposable
    Public NotInheritable Class ImageFrame
        Implements IDisposable
    Inheritance:
    System.Object
    ImageFrame
    Implements
    System.IDisposable

    Properties

    DpiX

    Gets the horizontal dots per inch (dpi) of the frame or System.Double.NaN.

    • C#
    • VB.NET
    public double DpiX { get; }
    Public ReadOnly Property DpiX As Double
    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.

    • C#
    • VB.NET
    public double DpiY { get; }
    Public ReadOnly Property DpiY As Double
    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.

    • C#
    • VB.NET
    public int Height { get; }
    Public ReadOnly Property Height As Integer
    Property Value
    System.Int32

    The height of the frame in pixels.

    Metadata

    Gets the metadata of the frame.

    • C#
    • VB.NET
    public ImageFrameMetadata Metadata { get; }
    Public ReadOnly Property Metadata As ImageFrameMetadata
    Property Value
    ImageFrameMetadata

    The metadata of the frame.

    Width

    Gets the width of the frame in pixels.

    • C#
    • VB.NET
    public int Width { get; }
    Public ReadOnly Property Width As Integer
    Property Value
    System.Int32

    The width of the frame in pixels.

    Methods

    ApplyFilter(Action<FilterBuilder>)

    Applies a filter.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    public void Dispose()
    Public Sub Dispose

    Resize(Nullable<Int32>, Nullable<Int32>)

    Resizes the frame to the given size.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    public void RotateFlip(RotateFlipType rotateFlipType)
    Public Sub RotateFlip(rotateFlipType As RotateFlipType)
    Parameters
    rotateFlipType
    RotateFlipType

    The rotate flip type to perform rotation and flipping.

    Implements

    System.IDisposable
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.