Click or drag to resize
Pdftools logo

ImageMask Class

Inheritance Hierarchy
SystemObject
  PdfTools.FourHeights.PdfToolbox.InternalNativeBase
    PdfTools.FourHeights.PdfToolbox.InternalNativeObject
      PdfTools.FourHeights.PdfToolbox.Pdf.ContentImageMask

Namespace: PdfTools.FourHeights.PdfToolbox.Pdf.Content
Assembly: PdfTools.FourHeights.PdfToolbox (in PdfTools.FourHeights.PdfToolbox.dll) Version: 4.4.1+cd45f416896d630bcd3719f4b2cba7920f2790da
Syntax
C#
public class ImageMask : NativeObject

The ImageMask type exposes the following members.

Properties
 NameDescription
Public propertySize

The size of the image mask in samples.

Top
Methods
 NameDescription
Public methodStatic memberCreate

Create an image mask object from image data.

Supported formats are:
  • BMP
  • DIB
  • JBIG2
  • PNG
  • GIF
The returned image mask object is not yet painted on any page, but it is associated with the given target document.
Public methodEquals
(Inherited from NativeObject)
Public methodExtract

Extract image mask from PDF

Facilitate the extraction of image masks from a specified page within a PDF, outputting them in the imageType format.

By default imageType takes the value Tiff.

Key considerations include:

  • The extraction process isolates the image from the page's resources, neglecting any contextual attributes from the PDF page. Consequently, the original resolution and modifications—such as scaling, rotation, or cropping—that influence the image's appearance on the page are not preserved in the extracted image mask.
  • In instances where a GenericException error arises, the output file may be compromised and rendered unusable.

This method is designed to efficiently retrieve image masks without their page-specific modifications, ensuring a straightforward extraction process.

Public methodGetHashCode
(Inherited from NativeObject)
Top
See Also