Class PdfImage
- Namespace
- PDiffy
- Assembly
- PDiffy.dll
An image. Hash comes from the decoded pixels where they can be decoded, so changing only how the image is compressed doesn't change it.
public sealed record PdfImage : IEquatable<PdfImage>
- Inheritance
-
PdfImage
- Implements
- Inherited Members
Properties
BlendMode
How its colors mix with what's drawn under it; Normal paints over it.
public PdfBlendMode BlendMode { get; init; }
Property Value
Clipped
Whether the clipping area (a clipping path, or the box of a form it's drawn in) leaves it out entirely, so it doesn't show. Content the clipping area cuts only partly isn't marked. A clipping path counts in its real shape, with curves traced in small straight steps. Text drawn in a clipping mode (4 to 7) clips to its letters' shapes, or to their boxes when PDiffy can't read the font's outlines, as with a standard font that isn't embedded.
public bool Clipped { get; init; }
Property Value
Covered
Whether something opaque drawn after it covers all of it, so it doesn't show. Only a shape filled with a plain color or an image without a mask counts as covering, and not when it's in a layer. It covers only what lies wholly inside its real shape. Content covered only partly isn't marked.
public bool Covered { get; init; }
Property Value
Fill
The color an image mask (an image that's only a shape) paints that shape with, written the same way as Fill; null for an image that isn't a mask.
public string? Fill { get; init; }
Property Value
GroupBlendModes
The blend modes of the transparency groups it's drawn in that BlendMode leaves out because it already holds a mode set inside the group, innermost first. Each mixes its group as a whole with what's under it. Empty when there are none.
public IReadOnlyList<PdfBlendMode> GroupBlendModes { get; init; }
Property Value
Hash
The first 16 hex digits of a SHA-256 of the decoded pixels, or of the bytes as stored when the pixels can't be decoded (such as a JPEG) or are too large to decompress. It also covers what decides how the pixels show: a color space such as a palette or color profile, a bit depth other than 8, a Decode array other than the default, masks and smoothing.
public required string Hash { get; init; }
Property Value
Height
The height the image is drawn at on the page, in points.
public required double Height { get; init; }
Property Value
Layers
The optional-content layers the image is drawn in, outermost first, by name, such as "Draft"; empty when it's drawn outside optional content. A viewer can hide a layer, so its content may not show or print.
public IReadOnlyList<string> Layers { get; init; }
Property Value
Opacity
How opaque it is, from 0 (invisible) to 1, rounded to two decimal places; 1 unless a graphics state makes it see-through.
public double Opacity { get; init; }
Property Value
Page
The page number, counted from 1.
public required int Page { get; init; }
Property Value
PixelHeight
The image's own height in pixels, however large it's drawn.
public required int PixelHeight { get; init; }
Property Value
PixelWidth
The image's own width in pixels, however large it's drawn.
public required int PixelWidth { get; init; }
Property Value
RenderingIntent
How colors outside what the output device can show are brought into what it can (the image's own /Intent, or else the ri operator or /RI in a graphics state); RelativeColorimetric, PDF's default, unless set.
public PdfRenderingIntent RenderingIntent { get; init; }
Property Value
Role
Whether the image is tagged, an artifact, or untagged.
public required PdfContentRole Role { get; init; }
Property Value
SoftMask
A hash of the soft masks that make parts of it see-through, as a gradient fade does, including what they draw, such as "3f9c0a1b2d4e5f60", or "unreadable"; null when it has no soft mask.
public string? SoftMask { get; init; }
Property Value
Width
The width the image is drawn at on the page, in points.
public required double Width { get; init; }
Property Value
X
The left edge of the image as drawn, in points from the page's left edge.
public required double X { get; init; }
Property Value
Y
The bottom edge of the image as drawn, in points from the page's bottom edge.
public required double Y { get; init; }