• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp
      • ByteOrder
      • Color
      • ColorMatrix
      • Configuration
      • DenseMatrix<T>
      • GeometryUtilities
      • GraphicOptionsDefaultsExtensions
      • GraphicsOptions
      • IConfigurationModule
      • IDeepCloneable
      • IDeepCloneable<T>
      • IImage
      • IImageInfo
      • Image
      • Image<TPixel>
      • ImageExtensions
      • ImageFormatException
      • ImageFrame
      • ImageFrame<TPixel>
      • ImageFrameCollection
      • ImageFrameCollection<TPixel>
      • ImageInfoExtensions
      • ImageProcessingException
      • IndexedImageFrame<TPixel>
      • InvalidImageContentException
      • Matrix3x2Extensions
      • MetadataExtensions
      • Number
      • PixelAccessor<TPixel>
      • PixelAccessorAction<TPixel>
      • PixelAccessorAction<TPixel1, TPixel2, TPixel3>
      • PixelAccessorAction<TPixel1, TPixel2>
      • Point
      • PointF
      • Rational
      • ReadOrigin
      • Rectangle
      • RectangleF
      • SignedRational
      • Size
      • SizeF
      • UnknownImageFormatException
    • SixLabors.ImageSharp.Advanced
      • AdvancedImageExtensions
      • IImageVisitor
      • IImageVisitorAsync
      • IRowIntervalOperation
      • IRowIntervalOperation<TBuffer>
      • IRowOperation
      • IRowOperation<TBuffer>
      • ParallelExecutionSettings
      • ParallelRowIterator
    • SixLabors.ImageSharp.ColorSpaces
      • CieLab
      • CieLch
      • CieLchuv
      • CieLuv
      • CieXyy
      • CieXyz
      • Cmyk
      • Hsl
      • Hsv
      • HunterLab
      • Illuminants
      • LinearRgb
      • Lms
      • Rgb
      • RgbWorkingSpaces
      • YCbCr
    • SixLabors.ImageSharp.ColorSpaces.Companding
      • GammaCompanding
      • LCompanding
      • Rec2020Companding
      • Rec709Companding
      • SRgbCompanding
    • SixLabors.ImageSharp.ColorSpaces.Conversion
      • CieXyChromaticityCoordinates
      • ColorSpaceConverter
      • ColorSpaceConverterOptions
      • GammaWorkingSpace
      • IChromaticAdaptation
      • LmsAdaptationMatrix
      • LWorkingSpace
      • Rec2020WorkingSpace
      • Rec709WorkingSpace
      • RgbPrimariesChromaticityCoordinates
      • RgbWorkingSpace
      • SRgbWorkingSpace
      • VonKriesChromaticAdaptation
    • SixLabors.ImageSharp.Compression.Zlib
      • DeflateCompressionLevel
    • SixLabors.ImageSharp.Diagnostics
      • MemoryDiagnostics
      • UndisposedAllocationDelegate
    • SixLabors.ImageSharp.Formats
      • IImageDecoder
      • IImageEncoder
      • IImageFormat
      • IImageFormat<TFormatMetadata, TFormatFrameMetadata>
      • IImageFormat<TFormatMetadata>
      • IImageFormatDetector
      • IImageInfoDetector
      • ImageFormatManager
      • PixelTypeInfo
    • SixLabors.ImageSharp.Formats.Bmp
      • BmpBitsPerPixel
      • BmpConfigurationModule
      • BmpDecoder
      • BmpEncoder
      • BmpFileMarkerType
      • BmpFormat
      • BmpImageFormatDetector
      • BmpInfoHeaderType
      • BmpMetadata
      • RleSkippedPixelHandling
    • SixLabors.ImageSharp.Formats.Gif
      • GifColorTableMode
      • GifConfigurationModule
      • GifDecoder
      • GifDisposalMethod
      • GifEncoder
      • GifFormat
      • GifFrameMetadata
      • GifImageFormatDetector
      • GifMetadata
      • IGifExtension
    • SixLabors.ImageSharp.Formats.Jpeg
      • JpegColorType
      • JpegConfigurationModule
      • JpegDecoder
      • JpegEncoder
      • JpegFormat
      • JpegImageFormatDetector
      • JpegMetadata
    • SixLabors.ImageSharp.Formats.Pbm
      • PbmColorType
      • PbmComponentType
      • PbmConfigurationModule
      • PbmDecoder
      • PbmEncoder
      • PbmEncoding
      • PbmFormat
      • PbmImageFormatDetector
      • PbmMetadata
    • SixLabors.ImageSharp.Formats.Png
      • PngBitDepth
      • PngChunkFilter
      • PngColorType
      • PngConfigurationModule
      • PngDecoder
      • PngEncoder
      • PngFilterMethod
      • PngFormat
      • PngImageFormatDetector
      • PngInterlaceMode
      • PngMetadata
      • PngTextData
      • PngTransparentColorMode
    • SixLabors.ImageSharp.Formats.Tga
      • TgaBitsPerPixel
      • TgaCompression
      • TgaConfigurationModule
      • TgaDecoder
      • TgaEncoder
      • TgaFormat
      • TgaImageFormatDetector
      • TgaImageType
      • TgaImageTypeExtensions
      • TgaMetadata
    • SixLabors.ImageSharp.Formats.Tiff
      • TiffBitsPerPixel
      • TiffBitsPerSample
      • TiffConfigurationModule
      • TiffDecoder
      • TiffEncoder
      • TiffFormat
      • TiffFormatType
      • TiffFrameMetadata
      • TiffImageFormatDetector
      • TiffMetadata
    • SixLabors.ImageSharp.Formats.Tiff.Compression
      • FaxCompressionOptions
    • SixLabors.ImageSharp.Formats.Tiff.Compression.Decompressors
      • LzwString
    • SixLabors.ImageSharp.Formats.Tiff.Constants
      • TiffCompression
      • TiffNewSubfileType
      • TiffPhotometricInterpretation
      • TiffPlanarConfiguration
      • TiffPredictor
      • TiffSampleFormat
      • TiffSubfileType
    • SixLabors.ImageSharp.Formats.Webp
      • WebpBitsPerPixel
      • WebpConfigurationModule
      • WebpDecoder
      • WebpEncoder
      • WebpEncodingMethod
      • WebpFileFormatType
      • WebpFormat
      • WebpImageFormatDetector
      • WebpMetadata
      • WebpTransparentColorMode
    • SixLabors.ImageSharp.Memory
      • AllocationOptions
      • Buffer2D<T>
      • Buffer2DExtensions
      • Buffer2DRegion<T>
      • IMemoryGroup<T>
      • InvalidMemoryOperationException
      • MemoryAllocator
      • MemoryAllocatorExtensions
      • MemoryAllocatorOptions
      • RowInterval
      • SimpleGcMemoryAllocator
    • SixLabors.ImageSharp.Metadata
      • FrameDecodingMode
      • ImageFrameMetadata
      • ImageMetadata
      • PixelResolutionUnit
    • SixLabors.ImageSharp.Metadata.Profiles.Exif
      • EncodedString
      • EncodedString.CharacterCode
      • ExifDataType
      • ExifOrientationMode
      • ExifParts
      • ExifProfile
      • ExifTag
      • ExifTag<TValueType>
      • IExifValue
      • IExifValue<TValueType>
    • SixLabors.ImageSharp.Metadata.Profiles.Icc
      • IccColorSpaceType
      • IccDeviceAttribute
      • IccPrimaryPlatformType
      • IccProfile
      • IccProfileClass
      • IccProfileFlag
      • IccProfileHeader
      • IccProfileId
      • IccProfileTag
      • IccRenderingIntent
      • IccTagDataEntry
      • IccTypeSignature
      • IccVersion
      • InvalidIccProfileException
    • SixLabors.ImageSharp.Metadata.Profiles.Iptc
      • IptcProfile
      • IptcTag
      • IptcTagExtensions
      • IptcValue
    • SixLabors.ImageSharp.Metadata.Profiles.Xmp
      • XmpProfile
    • SixLabors.ImageSharp.PixelFormats
      • A8
      • Abgr32
      • Argb32
      • Bgr24
      • Bgr565
      • Bgra32
      • Bgra4444
      • Bgra5551
      • Byte4
      • HalfSingle
      • HalfVector2
      • HalfVector4
      • IPackedVector<TPacked>
      • IPixel
      • IPixel<TSelf>
      • L16
      • L8
      • La16
      • La32
      • NormalizedByte2
      • NormalizedByte4
      • NormalizedShort2
      • NormalizedShort4
      • PixelAlphaCompositionMode
      • PixelAlphaRepresentation
      • PixelBlender<TPixel>
      • PixelColorBlendingMode
      • PixelConversionModifiers
      • PixelOperations<TPixel>
      • Rg32
      • Rgb24
      • Rgb48
      • Rgba1010102
      • Rgba32
      • Rgba64
      • RgbaVector
      • Short2
      • Short4
    • SixLabors.ImageSharp.Processing
      • AdaptiveThresholdExtensions
      • AffineTransformBuilder
      • AnchorPositionMode
      • AutoOrientExtensions
      • BackgroundColorExtensions
      • BinaryDitherExtensions
      • BinaryThresholdExtensions
      • BinaryThresholdMode
      • BlackWhiteExtensions
      • BokehBlurExtensions
      • BoxBlurExtensions
      • BrightnessExtensions
      • ColorBlindnessExtensions
      • ColorBlindnessMode
      • ContrastExtensions
      • CropExtensions
      • DetectEdgesExtensions
      • DitherExtensions
      • DrawImageExtensions
      • EntropyCropExtensions
      • FilterExtensions
      • FlipExtensions
      • FlipMode
      • GaussianBlurExtensions
      • GaussianSharpenExtensions
      • GlowExtensions
      • GrayscaleExtensions
      • GrayscaleMode
      • HistogramEqualizationExtensions
      • HueExtensions
      • IImageProcessingContext
      • InvertExtensions
      • KnownDitherings
      • KnownEdgeDetectorKernels
      • KnownFilterMatrices
      • KnownQuantizers
      • KnownResamplers
      • KodachromeExtensions
      • LightnessExtensions
      • LomographExtensions
      • OilPaintExtensions
      • OpacityExtensions
      • PadExtensions
      • PixelateExtensions
      • PixelRowDelegateExtensions
      • PixelRowOperation
      • PixelRowOperation<T>
      • PolaroidExtensions
      • ProcessingExtensions
      • ProjectiveTransformBuilder
      • QuantizeExtensions
      • ResizeExtensions
      • ResizeMode
      • ResizeOptions
      • RotateExtensions
      • RotateFlipExtensions
      • RotateMode
      • SaturateExtensions
      • SepiaExtensions
      • SkewExtensions
      • TaperCorner
      • TaperSide
      • TransformExtensions
      • VignetteExtensions
    • SixLabors.ImageSharp.Processing.Extensions.Transforms
      • SwizzleExtensions
    • SixLabors.ImageSharp.Processing.Processors
      • CloningImageProcessor
      • CloningImageProcessor<TPixel>
      • ICloningImageProcessor
      • ICloningImageProcessor<TPixel>
      • IImageProcessor
      • IImageProcessor<TPixel>
      • ImageProcessor<TPixel>
    • SixLabors.ImageSharp.Processing.Processors.Binarization
      • AdaptiveThresholdProcessor
      • BinaryThresholdProcessor
    • SixLabors.ImageSharp.Processing.Processors.Convolution
      • BokehBlurProcessor
      • BoxBlurProcessor
      • EdgeDetector2DKernel
      • EdgeDetector2DProcessor
      • EdgeDetectorCompassKernel
      • EdgeDetectorCompassProcessor
      • EdgeDetectorKernel
      • EdgeDetectorProcessor
      • GaussianBlurProcessor
      • GaussianSharpenProcessor
    • SixLabors.ImageSharp.Processing.Processors.Dithering
      • ErrorDither
      • IDither
      • IPaletteDitherImageProcessor<TPixel>
      • OrderedDither
      • PaletteDitherProcessor
    • SixLabors.ImageSharp.Processing.Processors.Drawing
      • DrawImageProcessor
    • SixLabors.ImageSharp.Processing.Processors.Effects
      • IPixelRowDelegate
      • OilPaintingProcessor
      • PixelateProcessor
    • SixLabors.ImageSharp.Processing.Processors.Filters
      • AchromatomalyProcessor
      • AchromatopsiaProcessor
      • BlackWhiteProcessor
      • BrightnessProcessor
      • ContrastProcessor
      • DeuteranomalyProcessor
      • DeuteranopiaProcessor
      • FilterProcessor
      • GrayscaleBt601Processor
      • GrayscaleBt709Processor
      • HueProcessor
      • InvertProcessor
      • KodachromeProcessor
      • LightnessProcessor
      • LomographProcessor
      • OpacityProcessor
      • PolaroidProcessor
      • ProtanomalyProcessor
      • ProtanopiaProcessor
      • SaturateProcessor
      • SepiaProcessor
      • TritanomalyProcessor
      • TritanopiaProcessor
    • SixLabors.ImageSharp.Processing.Processors.Normalization
      • AdaptiveHistogramEqualizationProcessor
      • AdaptiveHistogramEqualizationSlidingWindowProcessor
      • GlobalHistogramEqualizationProcessor
      • HistogramEqualizationMethod
      • HistogramEqualizationOptions
      • HistogramEqualizationProcessor
    • SixLabors.ImageSharp.Processing.Processors.Overlays
      • BackgroundColorProcessor
      • GlowProcessor
      • VignetteProcessor
    • SixLabors.ImageSharp.Processing.Processors.Quantization
      • DefaultPixelSamplingStrategy
      • ExtensivePixelSamplingStrategy
      • IPixelSamplingStrategy
      • IQuantizer
      • IQuantizer<TPixel>
      • OctreeQuantizer
      • OctreeQuantizer<TPixel>
      • PaletteQuantizer
      • QuantizeProcessor
      • QuantizerConstants
      • QuantizerOptions
      • QuantizerUtilities
      • WebSafePaletteQuantizer
      • WernerPaletteQuantizer
      • WuQuantizer
    • SixLabors.ImageSharp.Processing.Processors.Transforms
      • AffineTransformProcessor
      • AutoOrientProcessor
      • BicubicResampler
      • BoxResampler
      • CropProcessor
      • CubicResampler
      • DegenerateTransformException
      • EntropyCropProcessor
      • FlipProcessor
      • IResampler
      • IResamplingTransformImageProcessor<TPixel>
      • ISwizzler
      • LanczosResampler
      • NearestNeighborResampler
      • ProjectiveTransformProcessor
      • ResizeProcessor
      • RotateProcessor
      • SkewProcessor
      • SwizzleProcessor<TSwizzler>
      • TriangleResampler
      • WelchResampler

    Class ImageExtensions

    Extension methods for the Image type.

    Inheritance
    Object
    ImageExtensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: SixLabors.ImageSharp
    Assembly: SixLabors.ImageSharp.dll
    Syntax
    public static class ImageExtensions

    Methods

    | Improve this Doc View Source

    Save(Image, Stream, IImageFormat)

    Writes the image to the given stream using the given image format.

    Declaration
    public static void Save(this Image source, Stream stream, IImageFormat format)
    Parameters
    Type Name Description
    Image source

    The source image.

    Stream stream

    The stream to save the image to.

    IImageFormat format

    The format to save the image in.

    Exceptions
    Type Condition
    ArgumentNullException

    The stream is null.

    ArgumentNullException

    The format is null.

    NotSupportedException

    The stream is not writable.

    NotSupportedException

    No encoder available for provided format.

    | Improve this Doc View Source

    Save(Image, String)

    Writes the image to the given file path using an encoder detected from the path.

    Declaration
    public static void Save(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The source image.

    String path

    The file path to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    The path is null.

    NotSupportedException

    No encoder available for provided path.

    | Improve this Doc View Source

    Save(Image, String, IImageEncoder)

    Writes the image to the given file path using the given image encoder.

    Declaration
    public static void Save(this Image source, string path, IImageEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The source image.

    String path

    The file path to save the image to.

    IImageEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    The path is null.

    ArgumentNullException

    The encoder is null.

    | Improve this Doc View Source

    SaveAsBmp(Image, Stream)

    Saves the image to the given stream with the Bmp format.

    Declaration
    public static void SaveAsBmp(this Image source, Stream stream)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsBmp(Image, Stream, BmpEncoder)

    Saves the image to the given stream with the Bmp format.

    Declaration
    public static void SaveAsBmp(this Image source, Stream stream, BmpEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    BmpEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsBmp(Image, String)

    Saves the image to the given stream with the Bmp format.

    Declaration
    public static void SaveAsBmp(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsBmp(Image, String, BmpEncoder)

    Saves the image to the given stream with the Bmp format.

    Declaration
    public static void SaveAsBmp(this Image source, string path, BmpEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    BmpEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsBmpAsync(Image, Stream, BmpEncoder, CancellationToken)

    Saves the image to the given stream with the Bmp format.

    Declaration
    public static Task SaveAsBmpAsync(this Image source, Stream stream, BmpEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    BmpEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsBmpAsync(Image, Stream, CancellationToken)

    Saves the image to the given stream with the Bmp format.

    Declaration
    public static Task SaveAsBmpAsync(this Image source, Stream stream, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsBmpAsync(Image, String)

    Saves the image to the given stream with the Bmp format.

    Declaration
    public static Task SaveAsBmpAsync(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsBmpAsync(Image, String, BmpEncoder, CancellationToken)

    Saves the image to the given stream with the Bmp format.

    Declaration
    public static Task SaveAsBmpAsync(this Image source, string path, BmpEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    BmpEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsBmpAsync(Image, String, CancellationToken)

    Saves the image to the given stream with the Bmp format.

    Declaration
    public static Task SaveAsBmpAsync(this Image source, string path, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsGif(Image, Stream)

    Saves the image to the given stream with the Gif format.

    Declaration
    public static void SaveAsGif(this Image source, Stream stream)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsGif(Image, Stream, GifEncoder)

    Saves the image to the given stream with the Gif format.

    Declaration
    public static void SaveAsGif(this Image source, Stream stream, GifEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    GifEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsGif(Image, String)

    Saves the image to the given stream with the Gif format.

    Declaration
    public static void SaveAsGif(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsGif(Image, String, GifEncoder)

    Saves the image to the given stream with the Gif format.

    Declaration
    public static void SaveAsGif(this Image source, string path, GifEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    GifEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsGifAsync(Image, Stream, GifEncoder, CancellationToken)

    Saves the image to the given stream with the Gif format.

    Declaration
    public static Task SaveAsGifAsync(this Image source, Stream stream, GifEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    GifEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsGifAsync(Image, Stream, CancellationToken)

    Saves the image to the given stream with the Gif format.

    Declaration
    public static Task SaveAsGifAsync(this Image source, Stream stream, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsGifAsync(Image, String)

    Saves the image to the given stream with the Gif format.

    Declaration
    public static Task SaveAsGifAsync(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsGifAsync(Image, String, GifEncoder, CancellationToken)

    Saves the image to the given stream with the Gif format.

    Declaration
    public static Task SaveAsGifAsync(this Image source, string path, GifEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    GifEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsGifAsync(Image, String, CancellationToken)

    Saves the image to the given stream with the Gif format.

    Declaration
    public static Task SaveAsGifAsync(this Image source, string path, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsJpeg(Image, Stream)

    Saves the image to the given stream with the Jpeg format.

    Declaration
    public static void SaveAsJpeg(this Image source, Stream stream)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsJpeg(Image, Stream, JpegEncoder)

    Saves the image to the given stream with the Jpeg format.

    Declaration
    public static void SaveAsJpeg(this Image source, Stream stream, JpegEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    JpegEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsJpeg(Image, String)

    Saves the image to the given stream with the Jpeg format.

    Declaration
    public static void SaveAsJpeg(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsJpeg(Image, String, JpegEncoder)

    Saves the image to the given stream with the Jpeg format.

    Declaration
    public static void SaveAsJpeg(this Image source, string path, JpegEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    JpegEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsJpegAsync(Image, Stream, JpegEncoder, CancellationToken)

    Saves the image to the given stream with the Jpeg format.

    Declaration
    public static Task SaveAsJpegAsync(this Image source, Stream stream, JpegEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    JpegEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsJpegAsync(Image, Stream, CancellationToken)

    Saves the image to the given stream with the Jpeg format.

    Declaration
    public static Task SaveAsJpegAsync(this Image source, Stream stream, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsJpegAsync(Image, String)

    Saves the image to the given stream with the Jpeg format.

    Declaration
    public static Task SaveAsJpegAsync(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsJpegAsync(Image, String, JpegEncoder, CancellationToken)

    Saves the image to the given stream with the Jpeg format.

    Declaration
    public static Task SaveAsJpegAsync(this Image source, string path, JpegEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    JpegEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsJpegAsync(Image, String, CancellationToken)

    Saves the image to the given stream with the Jpeg format.

    Declaration
    public static Task SaveAsJpegAsync(this Image source, string path, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPbm(Image, Stream)

    Saves the image to the given stream with the Pbm format.

    Declaration
    public static void SaveAsPbm(this Image source, Stream stream)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsPbm(Image, Stream, PbmEncoder)

    Saves the image to the given stream with the Pbm format.

    Declaration
    public static void SaveAsPbm(this Image source, Stream stream, PbmEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    PbmEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsPbm(Image, String)

    Saves the image to the given stream with the Pbm format.

    Declaration
    public static void SaveAsPbm(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPbm(Image, String, PbmEncoder)

    Saves the image to the given stream with the Pbm format.

    Declaration
    public static void SaveAsPbm(this Image source, string path, PbmEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    PbmEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPbmAsync(Image, Stream, PbmEncoder, CancellationToken)

    Saves the image to the given stream with the Pbm format.

    Declaration
    public static Task SaveAsPbmAsync(this Image source, Stream stream, PbmEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    PbmEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsPbmAsync(Image, Stream, CancellationToken)

    Saves the image to the given stream with the Pbm format.

    Declaration
    public static Task SaveAsPbmAsync(this Image source, Stream stream, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsPbmAsync(Image, String)

    Saves the image to the given stream with the Pbm format.

    Declaration
    public static Task SaveAsPbmAsync(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPbmAsync(Image, String, PbmEncoder, CancellationToken)

    Saves the image to the given stream with the Pbm format.

    Declaration
    public static Task SaveAsPbmAsync(this Image source, string path, PbmEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    PbmEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPbmAsync(Image, String, CancellationToken)

    Saves the image to the given stream with the Pbm format.

    Declaration
    public static Task SaveAsPbmAsync(this Image source, string path, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPng(Image, Stream)

    Saves the image to the given stream with the Png format.

    Declaration
    public static void SaveAsPng(this Image source, Stream stream)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsPng(Image, Stream, PngEncoder)

    Saves the image to the given stream with the Png format.

    Declaration
    public static void SaveAsPng(this Image source, Stream stream, PngEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    PngEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsPng(Image, String)

    Saves the image to the given stream with the Png format.

    Declaration
    public static void SaveAsPng(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPng(Image, String, PngEncoder)

    Saves the image to the given stream with the Png format.

    Declaration
    public static void SaveAsPng(this Image source, string path, PngEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    PngEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPngAsync(Image, Stream, PngEncoder, CancellationToken)

    Saves the image to the given stream with the Png format.

    Declaration
    public static Task SaveAsPngAsync(this Image source, Stream stream, PngEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    PngEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsPngAsync(Image, Stream, CancellationToken)

    Saves the image to the given stream with the Png format.

    Declaration
    public static Task SaveAsPngAsync(this Image source, Stream stream, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsPngAsync(Image, String)

    Saves the image to the given stream with the Png format.

    Declaration
    public static Task SaveAsPngAsync(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPngAsync(Image, String, PngEncoder, CancellationToken)

    Saves the image to the given stream with the Png format.

    Declaration
    public static Task SaveAsPngAsync(this Image source, string path, PngEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    PngEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsPngAsync(Image, String, CancellationToken)

    Saves the image to the given stream with the Png format.

    Declaration
    public static Task SaveAsPngAsync(this Image source, string path, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTga(Image, Stream)

    Saves the image to the given stream with the Tga format.

    Declaration
    public static void SaveAsTga(this Image source, Stream stream)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsTga(Image, Stream, TgaEncoder)

    Saves the image to the given stream with the Tga format.

    Declaration
    public static void SaveAsTga(this Image source, Stream stream, TgaEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    TgaEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsTga(Image, String)

    Saves the image to the given stream with the Tga format.

    Declaration
    public static void SaveAsTga(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTga(Image, String, TgaEncoder)

    Saves the image to the given stream with the Tga format.

    Declaration
    public static void SaveAsTga(this Image source, string path, TgaEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    TgaEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTgaAsync(Image, Stream, TgaEncoder, CancellationToken)

    Saves the image to the given stream with the Tga format.

    Declaration
    public static Task SaveAsTgaAsync(this Image source, Stream stream, TgaEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    TgaEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsTgaAsync(Image, Stream, CancellationToken)

    Saves the image to the given stream with the Tga format.

    Declaration
    public static Task SaveAsTgaAsync(this Image source, Stream stream, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsTgaAsync(Image, String)

    Saves the image to the given stream with the Tga format.

    Declaration
    public static Task SaveAsTgaAsync(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTgaAsync(Image, String, TgaEncoder, CancellationToken)

    Saves the image to the given stream with the Tga format.

    Declaration
    public static Task SaveAsTgaAsync(this Image source, string path, TgaEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    TgaEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTgaAsync(Image, String, CancellationToken)

    Saves the image to the given stream with the Tga format.

    Declaration
    public static Task SaveAsTgaAsync(this Image source, string path, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTiff(Image, Stream)

    Saves the image to the given stream with the Tiff format.

    Declaration
    public static void SaveAsTiff(this Image source, Stream stream)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsTiff(Image, Stream, TiffEncoder)

    Saves the image to the given stream with the Tiff format.

    Declaration
    public static void SaveAsTiff(this Image source, Stream stream, TiffEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    TiffEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsTiff(Image, String)

    Saves the image to the given stream with the Tiff format.

    Declaration
    public static void SaveAsTiff(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTiff(Image, String, TiffEncoder)

    Saves the image to the given stream with the Tiff format.

    Declaration
    public static void SaveAsTiff(this Image source, string path, TiffEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    TiffEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTiffAsync(Image, Stream, TiffEncoder, CancellationToken)

    Saves the image to the given stream with the Tiff format.

    Declaration
    public static Task SaveAsTiffAsync(this Image source, Stream stream, TiffEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    TiffEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsTiffAsync(Image, Stream, CancellationToken)

    Saves the image to the given stream with the Tiff format.

    Declaration
    public static Task SaveAsTiffAsync(this Image source, Stream stream, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsTiffAsync(Image, String)

    Saves the image to the given stream with the Tiff format.

    Declaration
    public static Task SaveAsTiffAsync(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTiffAsync(Image, String, TiffEncoder, CancellationToken)

    Saves the image to the given stream with the Tiff format.

    Declaration
    public static Task SaveAsTiffAsync(this Image source, string path, TiffEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    TiffEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsTiffAsync(Image, String, CancellationToken)

    Saves the image to the given stream with the Tiff format.

    Declaration
    public static Task SaveAsTiffAsync(this Image source, string path, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsWebp(Image, Stream)

    Saves the image to the given stream with the Webp format.

    Declaration
    public static void SaveAsWebp(this Image source, Stream stream)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsWebp(Image, Stream, WebpEncoder)

    Saves the image to the given stream with the Webp format.

    Declaration
    public static void SaveAsWebp(this Image source, Stream stream, WebpEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    WebpEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsWebp(Image, String)

    Saves the image to the given stream with the Webp format.

    Declaration
    public static void SaveAsWebp(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsWebp(Image, String, WebpEncoder)

    Saves the image to the given stream with the Webp format.

    Declaration
    public static void SaveAsWebp(this Image source, string path, WebpEncoder encoder)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    WebpEncoder encoder

    The encoder to save the image with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsWebpAsync(Image, Stream, WebpEncoder, CancellationToken)

    Saves the image to the given stream with the Webp format.

    Declaration
    public static Task SaveAsWebpAsync(this Image source, Stream stream, WebpEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    WebpEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsWebpAsync(Image, Stream, CancellationToken)

    Saves the image to the given stream with the Webp format.

    Declaration
    public static Task SaveAsWebpAsync(this Image source, Stream stream, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    Stream stream

    The stream to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the stream is null.

    | Improve this Doc View Source

    SaveAsWebpAsync(Image, String)

    Saves the image to the given stream with the Webp format.

    Declaration
    public static Task SaveAsWebpAsync(this Image source, string path)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsWebpAsync(Image, String, WebpEncoder, CancellationToken)

    Saves the image to the given stream with the Webp format.

    Declaration
    public static Task SaveAsWebpAsync(this Image source, string path, WebpEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    WebpEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsWebpAsync(Image, String, CancellationToken)

    Saves the image to the given stream with the Webp format.

    Declaration
    public static Task SaveAsWebpAsync(this Image source, string path, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Image source

    The image this method extends.

    String path

    The file path to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the path is null.

    | Improve this Doc View Source

    SaveAsync(Image, Stream, IImageFormat, CancellationToken)

    Writes the image to the given stream using the given image format.

    Declaration
    public static Task SaveAsync(this Image source, Stream stream, IImageFormat format, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The source image.

    Stream stream

    The stream to save the image to.

    IImageFormat format

    The format to save the image in.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    The stream is null.

    ArgumentNullException

    The format is null.

    NotSupportedException

    The stream is not writable.

    NotSupportedException

    No encoder available for provided format.

    | Improve this Doc View Source

    SaveAsync(Image, String, IImageEncoder, CancellationToken)

    Writes the image to the given file path using the given image encoder.

    Declaration
    public static async Task SaveAsync(this Image source, string path, IImageEncoder encoder, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The source image.

    String path

    The file path to save the image to.

    IImageEncoder encoder

    The encoder to save the image with.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    The path is null.

    ArgumentNullException

    The encoder is null.

    | Improve this Doc View Source

    SaveAsync(Image, String, CancellationToken)

    Writes the image to the given file path using an encoder detected from the path.

    Declaration
    public static Task SaveAsync(this Image source, string path, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Image source

    The source image.

    String path

    The file path to save the image to.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    The path is null.

    NotSupportedException

    No encoder available for provided path.

    | Improve this Doc View Source

    ToBase64String(Image, IImageFormat)

    Returns a Base64 encoded string from the given image. The result is prepended with a Data URI https://en.wikipedia.org/wiki/Data_URI_scheme

    For example: data:image/gif;base64,R0lGODlhAQABAIABAEdJRgAAACwAAAAAAQABAAACAkQBAA==

    Declaration
    public static string ToBase64String(this Image source, IImageFormat format)
    Parameters
    Type Name Description
    Image source

    The source image

    IImageFormat format

    The format.

    Returns
    Type Description
    String

    The String

    Exceptions
    Type Condition
    ArgumentNullException

    The format is null.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX