# PdfExtractedImage

Represents an image XObject extracted from a parsed PDF page.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfExtractedImage.cs:136](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L136)

**Modifiers**

sealed

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](/api/pdf/officeimo-pdf-pdfdocument/#method-extractimages)
- Method [PdfDocumentImageEditor.Extract](/api/pdf/officeimo-pdf-pdfdocumentimageeditor/#method-extract-officeimo-pdf-pdfloadoptions)
- Property [PdfLogicalImage.SourceImage](/api/pdf/officeimo-pdf-pdflogicalimage/#property-sourceimage)
- Method [PdfReadPage.GetImages](/api/pdf/officeimo-pdf-pdfreadpage/#method-getimages)

### Accepted by parameters 1

- Method [PdfDocumentImageEditor.Visit](/api/pdf/officeimo-pdf-pdfdocumentimageeditor/#method-visit-action-officeimo-pdf-pdfextractedimage-threading-cancellationtoken) parameter `visit`

Filter members 

Show inherited

## Methods

`public void CopyTo(Stream destination, CancellationToken cancellationToken = default)` [#](#method-copyto-io-stream-threading-cancellationtoken)

[PdfExtractedImage.cs:136](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L136)

Copies extracted image bytes without creating another in-memory payload.

Parameters

**destination System.IO.Stream required**

**cancellationToken System.Threading.CancellationToken = default optional**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public int PageNumber { get; }` [#](#property-pagenumber)

[PdfExtractedImage.cs:93](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L93)

One-based page number containing the image resource.

`public string ResourceName { get; }` [#](#property-resourcename)

[PdfExtractedImage.cs:96](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L96)

Image resource name from the page XObject dictionary.

`public int ObjectNumber { get; }` [#](#property-objectnumber)

[PdfExtractedImage.cs:99](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L99)

PDF object number for the image stream, or 0 when the image is direct.

`public int Width { get; }` [#](#property-width)

[PdfExtractedImage.cs:107](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L107)

Image width in pixels.

`public int Height { get; }` [#](#property-height)

[PdfExtractedImage.cs:110](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L110)

Image height in pixels.

`public int BitsPerComponent { get; }` [#](#property-bitspercomponent)

[PdfExtractedImage.cs:113](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L113)

Bits per color component.

`public bool Interpolate { get; }` [#](#property-interpolate)

[PdfExtractedImage.cs:116](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L116)

Whether the PDF requests interpolation while scaling the image.

`public string ColorSpace { get; }` [#](#property-colorspace)

[PdfExtractedImage.cs:119](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L119)

PDF color space name when available.

`public string Filter { get; }` [#](#property-filter)

[PdfExtractedImage.cs:122](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L122)

PDF filter name or names when available.

`public byte[] Bytes { get; }` [#](#property-bytes)

[PdfExtractedImage.cs:132](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L132)

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; }` [#](#property-fileextension)

[PdfExtractedImage.cs:153](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L153)

Suggested file extension, such as jpg or png, when the bytes are a complete image file.

`public string? MimeType { get; }` [#](#property-mimetype)

[PdfExtractedImage.cs:156](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L156)

Suggested MIME type when the bytes are a complete image file.

`public bool IsImageFile { get; }` [#](#property-isimagefile)

[PdfExtractedImage.cs:159](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L159)

True when [PdfExtractedImage.Bytes](/api/pdf/officeimo-pdf-pdfextractedimage/) is a complete image file rather than a raw PDF image stream.

`public string? TransparencyMaskKind { get; }` [#](#property-transparencymaskkind)

[PdfExtractedImage.cs:162](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L162)

PDF transparency mask kind attached to the image, such as soft-mask, color-key-mask, or explicit-mask-image.

`public bool TransparencyMaskResolved { get; }` [#](#property-transparencymaskresolved)

[PdfExtractedImage.cs:165](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L165)

True when the extracted image payload includes the PDF transparency mask semantics.

`public bool HasTransparencyMask { get; }` [#](#property-hastransparencymask)

[PdfExtractedImage.cs:186](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L186)

True when the source PDF image declared a transparency mask.

`public bool HasUnresolvedTransparencyMask { get; }` [#](#property-hasunresolvedtransparencymask)

[PdfExtractedImage.cs:189](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L189)

True when the source PDF image declared a transparency mask that is not represented by the extracted payload.

`public bool IsImageMask { get; }` [#](#property-isimagemask)

[PdfExtractedImage.cs:192](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L192)

True when this image came from a PDF /ImageMask stencil XObject.

`public OfficeColor ImageMaskColor { get; }` [#](#property-imagemaskcolor)

[PdfExtractedImage.cs:195](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L195)

Paint color applied to a stencil image mask.

`public OfficeIccRenderingIntent RenderingIntent { get; }` [#](#property-renderingintent)

[PdfExtractedImage.cs:198](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L198)

Effective ICC rendering intent used while normalizing extracted samples.

`public bool HasAuthoredRenderingIntent { get; }` [#](#property-hasauthoredrenderingintent)

[PdfExtractedImage.cs:201](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L201)

True when the source image or active graphics state explicitly selected a rendering intent.

`public bool HasExplicitDecode { get; }` [#](#property-hasexplicitdecode)

[PdfExtractedImage.cs:204](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L204)

True when the image declared a Decode array.

`public bool HasDecodeParameters { get; }` [#](#property-hasdecodeparameters)

[PdfExtractedImage.cs:210](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfExtractedImage.cs#L210)

True when the image filter declared DecodeParms.

<!-- PowerForge markdown artifact sha256:08B9EC9B4F39EFB7F9B381665EAB899E2055B3F46DE2455CA189BF2D996505D2 -->
