Class ImageElement
PDF image element
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.Media.PDF.Elements
Assembly: Azos.Media.dll
Syntax
public class ImageElement : PdfElement, IPdfObject, IPdfXObject
Constructors
ImageElement(String)
Declaration
public ImageElement(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath |
ImageElement(String, Single, Single)
Declaration
public ImageElement(string filePath, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | |
System.Single | width | |
System.Single | height |
Properties
BitsPerPixel
Returns image's bits per pixel
Declaration
public int BitsPerPixel { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Content
Image bytes
Declaration
public byte[] Content { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Height
PDF displayed image height
Declaration
public float Height { get; }
Property Value
Type | Description |
---|---|
System.Single |
OwnHeight
Image's own height
Declaration
public float OwnHeight { get; }
Property Value
Type | Description |
---|---|
System.Single |
OwnWidth
Image's own widht
Declaration
public float OwnWidth { get; }
Property Value
Type | Description |
---|---|
System.Single |
Width
PDF displayed image width
Declaration
public float Width { get; }
Property Value
Type | Description |
---|---|
System.Single |
XObjectId
Image unique object Id
Declaration
public int XObjectId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
GetCoupledReference()
Declaration
public string GetCoupledReference()
Returns
Type | Description |
---|---|
System.String |
GetXReference()
Returns PDF x-object indirect reference
Declaration
public string GetXReference()
Returns
Type | Description |
---|---|
System.String |
Write(PdfWriter)
Writes element into file stream
Declaration
public override void Write(PdfWriter writer)
Parameters
Type | Name | Description |
---|---|---|
PdfWriter | writer | PDF writer |