[]
Base abstract class for classes describing images in a PDF file, including inline PDF images defined in the PDF content stream using BI and EI operators.
public abstract class PdfImageBase : PdfDictWrapper, IPdfDict, IPdfImage, IImage, IDisposable
Gets the number of bits-per-pixel (BPP) for this image.
public abstract int BitsPerPixel { get; }
Gets the height of the image in pixels.
public abstract int Height { get; }
Gets the horizontal resolution of the image. If this property returns a value that is less or equal than 0, then the horizontal resolution is not specified for an image.
public abstract float HorizontalResolution { get; }
Gets a value indicating whether the image is defined as a stencil mask for painting in the current color.
public virtual bool ImageMask { get; }
Gets a value indicating whether the image is an inline image defined directly in a PDF content stream.
public virtual bool InlineImage { get; }
Gets the vertical resolution of the image. If this property returns a value that is less or equal than 0, then the vertical resolution is not specified for an image.
public abstract float VerticalResolution { get; }
Gets the width of the image in pixels.
public abstract int Width { get; }
For internal use. Returns a key uniquely identifying the object in its GcPdfDocument, can return null if object can not be uniquely identified.
public virtual object GetCacheKey()
The key uniquely identifying the object.
Returns the GrapeCity.Documents.Pdf.Spec.PdfStreamObject containing unparsed image data and information about the PDF filter and decode parameters.
Note that not all derived classes support this method (for example, PdfImageHandler).
public abstract PdfStreamInfo GetImageStreamInfo()
Creates and returns a GcBitmap object representing the current PdfImageBase object.
IMPORTANT NOTE: the returned bitmap must be disposed after use.
An image in a PDF can be specified as an "image mask" (see ImageMask),
in which case the image data is used as a stencil mask for painting in the current color
specified by currentUnmaskedColor
,
maskedColor
specifies the color of the area excluded from filling
(it is transparent in most cases).
public GcBitmap GetNativeImage(Color currentUnmaskedColor, Color maskedColor)
currentUnmaskedColor
System.Drawing.ColorThe current color used to fill the unmasked area.
maskedColor
System.Drawing.ColorThe color of the area that is excluded from filling (typically transparent).
Retrieves the underlying GcBitmap object, or creates a new GcBitmap that contains the image data.
Note that you should dispose the returned GcBitmap if disposeAfterUse
is true.
public GcBitmap ToGcBitmap(out bool disposeAfterUse)
disposeAfterUse
boolOUT: Indicates whether the returned GcBitmap should be disposed by the user.