• Introduction
  • Programmer's Guide
  • Technical Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • ic4
      • BufferPool
      • DeviceEnum
      • DeviceInfo
      • Display
      • DisplayNotation
      • DisplayRenderPosition
      • DisplayStatistics
      • DisplayType
      • EmbeddedDisplay
      • ErrorCode
      • ExternalOpenGLDisplay
      • FloatRepresentation
      • FloatingDisplay
      • FrameMetaData
      • Grabber
      • HandleObject
      • IBufferAllocator
      • IC4Exception
      • IDisplay
      • ImageBuffer
      • ImageBuffer.CopyOptions
      • ImageBufferExtensions
      • ImageBufferExtensionsHalconDotNet
      • ImageBufferExtensionsOpenCvSharp
      • ImageBufferExtensionsSystemDrawing
      • ImageBufferExtensionsSystemWindowsMedia
      • ImageType
      • IntRepresentation
      • Interface
      • Library
      • LogLevel
      • LogTarget
      • PixelFormat
      • PixelFormatExtensions
      • PngCompressionLevel
      • PropBoolean
      • PropCategory
      • PropCommand
      • PropEnumEntry
      • PropEnumeration
      • PropFloat
      • PropId
      • PropIdBoolean
      • PropIdCommand
      • PropIdEnumeration
      • PropIdFloat
      • PropIdInteger
      • PropIdRegister
      • PropIdString
      • PropInteger
      • PropRegister
      • PropString
      • Property
      • PropertyIncrementMode
      • PropertyMap
      • PropertyType
      • PropertyVisibility
      • QueueSink
      • QueueSinkConnectedEventArgs
      • QueueSinkEventArgs
      • QueueSinkQueueSizes
      • Sink
      • SinkMode
      • SinkType
      • SnapSink
      • SnapSinkAllocationStrategy
      • StreamSetupOption
      • StreamStatistics
      • TransportLayerType
      • VersionInfoFlags
      • VideoWriter
      • VideoWriterType
    • ic4.WinForms
      • Dialogs
      • Display
      • PropertyDialogFlags

    Class ImageType

    Represents an image type, including pixel format and image dimensions.

    Inheritance
    object
    ImageType
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: ic4
    Assembly: ic4dotnet.dll
    Syntax
    public class ImageType

    Constructors

    ImageType(int, int, PixelFormat)

    Creates a new image type object.

    Declaration
    public ImageType(int width = 0, int height = 0, PixelFormat pixelFormat = PixelFormat.Unspecified)
    Parameters
    Type Name Description
    int width

    The width of the image in pixels, or 0 if the width is not specified

    int height

    The height of the image in pixels, or 0 if the width is not specified

    PixelFormat pixelFormat

    The pixel format of the image, or Unspecified if the pixel format is not specified

    Properties

    Height

    The height of the image

    Declaration
    public int Height { get; set; }
    Property Value
    Type Description
    int

    The height of the image in pixels, or 0 if the width is not specified

    PixelFormat

    The pixel format of the image

    Declaration
    public PixelFormat PixelFormat { get; set; }
    Property Value
    Type Description
    PixelFormat

    The pixel format of the image, or Unspecified if the pixel format is not specified

    Width

    The width of the image

    Declaration
    public int Width { get; set; }
    Property Value
    Type Description
    int

    The width of the image in pixels, or 0 if the width is not specified

    Methods

    ToString()

    Creates a textual representation of the image type

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A textual representation of the image type

    Overrides
    object.ToString()
    Exceptions
    Type Condition
    IC4Exception

    Check ErrorCode and ToString() for details.

    WithPixelFormat(PixelFormat)

    Creates a new image type based on this with a modified pixel format.

    Declaration
    public ImageType WithPixelFormat(PixelFormat newPixelFormat)
    Parameters
    Type Name Description
    PixelFormat newPixelFormat

    The pixel format of the new image type

    Returns
    Type Description
    ImageType

    A new image type with the specified pixel format and the dimensions of this

    WithSize(int, int)

    Creates a new image type based on this with modified dimensions.

    Declaration
    public ImageType WithSize(int newWidth, int newHeight)
    Parameters
    Type Name Description
    int newWidth

    The width of the new image type

    int newHeight

    The height of the new image type

    Returns
    Type Description
    ImageType

    A new image type with the specified dimensions and pixel format and the pixel format of this

    In this article
    Copyright ©️ 2026 The Imaging Source Europe GmbH www.theimagingsource.com