Click or drag to resize

PdfImage Class

A rectangular array of sample values, each representing a color.
Inheritance Hierarchy
SystemObject
  SautinSoft.PdfPdfObject
    SautinSoft.Pdf.ContentPdfContentResource
      SautinSoft.Pdf.ContentPdfExternalObject
        SautinSoft.Pdf.ContentPdfImage

Namespace: SautinSoft.Pdf.Content
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2024.8.8
Syntax
public sealed class PdfImage : PdfExternalObject

The PdfImage type exposes the following members.

Properties
 NameDescription
Public propertyAssociatedFiles(Optional; PDF 2.0) An array of one or more PdfFileSpecifications which denote the associated files for this PdfImage or PdfForm.
(Inherited from PdfExternalObject)
Public propertyBitsPerComponent

(Required except for image masks and images that use the JPXDecode filter) The number of bits used to represent each colour component.

Only a single value shall be specified; the number of bits shall be the same for all colour components. The value shall be 1, 2, 4, 8, or (in PDF 1.5) 16.

If ImageMask is , this entry is optional, but if specified, its value shall be 1.

Public propertyColorSpace(Required for images, except those that use the JPXDecode filter; not permitted for image masks) The colour space in which image samples shall be specified; it can be any type of colour space except Pattern.
Public propertyDocument Gets the PdfDocument associated with this PdfContentResource or if no PdfDocument is associated with this PdfContentResource.
(Inherited from PdfContentResource)
Public propertyExplicitMask

(Optional; shall not be present for image masks; PDF 1.3) An image XObject defining an image mask to be applied to this image (see 8.9.6.3,"Explicit masking"), or an array specifying a range of colours to be applied to it as a colour key mask (see 8.9.6.4, "Colour key masking").

If ImageMask is true, this entry shall not be present.

Public propertyHeight(Required) The height of the image, in samples.
Public propertyImageMask

(Optional) A flag indicating whether the image shall be treated as an image mask (see 8.9.6, "Masked Images").

If this flag is , the value of BitsPerComponent shall be 1 and Mask and ColorSpace shall not be specified; unmasked areas shall be painted using the current nonstroking color.

Default value: .

Public propertyMetadata(Optional; PDF 1.4) A metadata stream containing metadata for the component.
(Inherited from PdfObject)
Public propertySize Gets or sets the size of the PdfImage.
Public propertySoftMask

(Optional; PDF 1.4) A subsidiary image XObject defining a soft-mask image (see 11.6.5.2, "Soft-mask images") that shall be used as a source of mask shape or mask opacity values in the transparent imaging model. The alpha source parameter in the graphics state determines whether the mask values shall be interpreted as shape or opacity.

If present, this entry shall override the current soft mask in the graphics state, as well as the image’s Mask entry, if any.

Public propertyWidth(Required) The width of the image, in samples.
Top
Methods
 NameDescription
Public methodClone Clones this PdfImage.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodStatic memberLoad(Stream) Loads a PdfImage from the specified stream and with the Default options.
Public methodStatic memberLoad(String) Loads a PdfImage from a file with the specified path and with the Default options.
Public methodStatic memberLoad(Stream, ImageLoadOptions) Loads a PdfImage from the specified stream and with the specified options.
Public methodStatic memberLoad(String, ImageLoadOptions) Loads a PdfImage from a file with the specified path and with the specified options.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodGetArray Gets the PdfArray that serves as a backing storage of the specified PdfObject or if no PdfArray serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Public Extension MethodGetDictionary Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Public Extension MethodGetOrAddDictionary Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Top
See Also