PDFVisualImage¶
Namespace: O2S.Components.PDF4NET.Content
Defines an image that displayed on a PDF page.
Inheritance Object → PDFVisualImage
Constructors¶
Properties¶
BitsPerComponent¶
Gets the bits per component.
Property Value
Int32
The number of bits used to represent a color component in the image's colorspace.
ChromaKeyMask¶
Gets the image chroma key mask.
Property Value
Int32[]
An array of color components specifying the range of colors that are considered transparent.
ColorSpace¶
Gets the image colorspace.
Property Value
PDFColorSpace
The colorspace the image data is represent in.
CosStream¶
Gets the inernal COS stream that represents the image object.
Property Value
PDFCosStream
A PDFCosStream representing the raw image.
DisplayHeight¶
Gets the height of the displayed image on the page.
Property Value
Double
The height, in points, of the displayed image on the page.
DisplayWidth¶
Gets the width of the displayed image on the page.
Property Value
Double
The width, in points, of the displayed image on the page.
DpiX¶
Gets the image's horizontal resolution.
Property Value
Double
The horizontal resolution of the displayed image.
DpiY¶
Gets the image's vertical resolution.
Property Value
Double
The vertical resolution of the displayed image.
Height¶
Gets the image height.
Property Value
Int32
The height of the image in pixels.
ImageCorners¶
Gets the coordinates of the image corners.
Property Value
PDFPoint[]
The coordinates on the page of the image's corners.
Remarks
The order of the corners in the array is the following: lower left, lower right, upper right, upper left.
ImageFormat¶
Gets the format of the embedded image.
Property Value
PDFVisualImageFormat
The format the image is embedded in the PDF file.
ImageID¶
Gets the image ID.
Property Value
String
The ID of the image in the page's resources dictionary.
IsImageMask¶
Gets a value indicating whether this image is actually a mask.
Property Value
Boolean
True if the image represents a mask.
Mask¶
Gets the image mask.
Property Value
PDFVisualImage
The mask associated with this image.
Palette¶
Gets the image palette.
Property Value
Byte[]
An array of bytes representing RGB tuples that define the image palette or null if the image does not use a palette.
Width¶
Gets the image width.
Property Value
Int32
The width of the image in pixels.
Methods¶
Save(Stream, PDFVisualImageSaveFormat)¶
Saves the image to the stream.
Parameters
stream Stream
Destination stream where the image will be saved.
imageSaveFormat PDFVisualImageSaveFormat
Format used for saving the image.
Exceptions
InvalidOperationException
Thrown when the Save method is called on an image that has been extracted without its data,
PDFContentExtractor.ExtractImages method has been called using 'false' as its parameter.
- or -
when the image format is JPEG2000
and the imageSaveFormat is not PDFVisualImageSaveFormat.Native.