PdfExtractedImage
OfficeIMO.Pdf
Represents an image XObject extracted from a parsed PDF page.
Inheritance
- object
- PdfExtractedImage
Usage
Explore 5 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
- Method PdfDocument.ExtractImages
- Method PdfDocumentImageEditor.Extract
- Property PdfLogicalImage.SourceImage
- Method PdfReadPage.GetImages
Accepted by parameters 1
- Method PdfDocumentImageEditor.Visit
Methods
public void CopyTo(Stream destination, CancellationToken cancellationToken = default) #Copies extracted image bytes without creating another in-memory payload.
Parameters
- destination System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
Properties
public int PageNumber { get; } #One-based page number containing the image resource.
public string ResourceName { get; } #Image resource name from the page XObject dictionary.
public int ObjectNumber { get; } #PDF object number for the image stream, or 0 when the image is direct.
public bool Interpolate { get; } #Whether the PDF requests interpolation while scaling the image.
public byte[] Bytes { get; } #Extracted bytes. JPEG images are returned as JPEG files. Simple PNG-predictor Flate images, supported ImageMask stencil streams, color-key masked simple and Indexed streams, Decode-aware simple 8-bit DeviceGray/DeviceRGB/basic-converted DeviceCMYK streams, basic ICCBased N=1/3/4 streams, and Decode-aware Indexed palette streams are returned as PNG files when their filters are supported. JPEG images with PDF transparency masks can expose unresolved mask metadata when the JPEG payload is passed through without alpha conversion. Other supported image streams return their original encoded bytes.
public string? FileExtension { get; } #Suggested file extension, such as jpg or png, when the bytes are a complete image file.
public string? MimeType { get; } #Suggested MIME type when the bytes are a complete image file.
public bool IsImageFile { get; } #True when PdfExtractedImage.Bytes is a complete image file rather than a raw PDF image stream.
public string? TransparencyMaskKind { get; } #PDF transparency mask kind attached to the image, such as soft-mask, color-key-mask, or explicit-mask-image.
public bool TransparencyMaskResolved { get; } #True when the extracted image payload includes the PDF transparency mask semantics.
public bool HasTransparencyMask { get; } #True when the source PDF image declared a transparency mask.
public bool HasUnresolvedTransparencyMask { get; } #True when the source PDF image declared a transparency mask that is not represented by the extracted payload.
public bool IsImageMask { get; } #True when this image came from a PDF /ImageMask stencil XObject.
public OfficeColor ImageMaskColor { get; } #Paint color applied to a stencil image mask.
public OfficeIccRenderingIntent RenderingIntent { get; } #Effective ICC rendering intent used while normalizing extracted samples.
public bool HasAuthoredRenderingIntent { get; } #True when the source image or active graphics state explicitly selected a rendering intent.
public bool HasExplicitDecode { get; } #True when the image declared a Decode array.
public bool HasDecodeParameters { get; } #True when the image filter declared DecodeParms.