Click or drag to resize

PngEncoder Class

An ImageEncoder that will write Portable Network Graphics (PNG) images to a Stream.

Inheritance Hierarchy
SystemObject
  Atalasoft.Imaging.CodecImageEncoder
    Atalasoft.Imaging.CodecPngEncoder

Namespace:  Atalasoft.Imaging.Codec
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public class PngEncoder : ImageEncoder

The PngEncoder type exposes the following members.

Constructors
  NameDescription
Public methodPngEncoder
Initializes a new instance of the PngEncoder class.
Public methodPngEncoder(ComTextCollection)
Initializes a new instance of a PngEncoder specifying the COM Text metadata to save.
Public methodPngEncoder(Color, Double, Boolean, ComTextCollection)
Initializes a new instance of a %PngEncoder% specifying the background color, gamma, interlace, and COM Text value to save.
Top
Properties
  NameDescription
Public propertyBackgroundColor
Gets or sets the color to use as the default background color for Png images with alpha.
Public propertyBackgroundIndex
Gets or sets the palette index or grayscale value to use as the default background color for colormapped Png images with alpha.
Public propertyComText
Gets or sets the COM text metadata to save with the image.
Public propertyGamma
Gets or sets the gamma value to write to a PNG image. 0 will not write any value, 2.2 is a typical value for PC's. Default 0.
Public propertyInterlace
Gets or sets whether Png files are saved with a pixel row interlacing pattern. Defaults False.
Public propertySupportedPixelFormats
Returns an array of pixel formats supported by this encoder.
(Overrides ImageEncoderSupportedPixelFormats.)
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsPixelFormatSupported
Returns true if the given PixelFormat can be encoded with the derived encoder.
(Inherited from ImageEncoder.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSave
Encode an %AtalaImage% as a Png image to a stream.
(Overrides ImageEncoderSave(Stream, AtalaImage, ProgressEventHandler).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

This ImageEncoder can be passed into the the AtalaImage or Workspace objects when saving to specify a PNG image.

If the image being saved contains a ColorProfile, it will be embedded within the file.

See Also