HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.Image Class Reference

An Image is the representation of a graphic element (JPEG, PNG or GIF) that has to be inserted into the document More...

Inheritance diagram for iTextSharp.text.Image:
iTextSharp.text.Rectangle iTextSharp.text.Element iTextSharp.text.IElement iTextSharp.text.ImgCCITT iTextSharp.text.ImgJBIG2 iTextSharp.text.ImgRaw iTextSharp.text.ImgTemplate iTextSharp.text.ImgWMF iTextSharp.text.Jpeg iTextSharp.text.Jpeg2000

Public Member Functions

 Image (Uri url)
 Constructs an Image-object, using an url. More...
 
 Image (Image image)
 Constructs an Image object duplicate. More...
 
void SetAbsolutePosition (float absoluteX, float absoluteY)
 Sets the absolute position of the Image. More...
 
void ScaleAbsolute (float newWidth, float newHeight)
 Scale the image to an absolute width and an absolute height. More...
 
void ScaleAbsoluteWidth (float newWidth)
 Scale the image to an absolute width. More...
 
void ScaleAbsoluteHeight (float newHeight)
 Scale the image to an absolute height. More...
 
void ScalePercent (float percent)
 Scale the image to a certain percentage. More...
 
void ScalePercent (float percentX, float percentY)
 Scale the width and height of an image to a certain percentage. More...
 
void ScaleToFit (float fitWidth, float fitHeight)
 Scales the image so that it fits a certain width and height. More...
 
float GetImageRotation ()
 
bool HasAbsolutePosition ()
 Checks if the Images has to be added at an absolute position. More...
 
bool HasAbsoluteX ()
 Checks if the Images has to be added at an absolute X position. More...
 
override bool IsNestable ()
 
bool IsJpeg ()
 Returns true if the image is a Jpeg-object. More...
 
bool IsImgRaw ()
 Returns true if the image is a ImgRaw-object. More...
 
bool IsImgTemplate ()
 Returns true if the image is an ImgTemplate-object. More...
 
void SetDpi (int dpiX, int dpiY)
 
bool IsMaskCandidate ()
 Returns true if this Image has the requisites to be a mask. More...
 
void MakeMask ()
 Make this Image a mask. More...
 
bool IsMask ()
 Returns true if this Image is a mask. More...
 
bool HasICCProfile ()
 
void SimplifyColorspace ()
 
- Public Member Functions inherited from iTextSharp.text.Rectangle
 Rectangle (float llx, float lly, float urx, float ury)
 Constructs a Rectangle-object. More...
 
 Rectangle (float urx, float ury)
 Constructs a Rectangle-object starting from the origin (0, 0). More...
 
 Rectangle (Rectangle rect)
 Constructs a Rectangle-object. More...
 
virtual void CloneNonPositionParameters (Rectangle rect)
 
virtual void SoftCloneNonPositionParameters (Rectangle rect)
 
virtual bool Process (IElementListener listener)
 Processes the element by adding it (or the different parts) to an IElementListener. More...
 
bool IsContent ()
 
virtual void Normalize ()
 
Rectangle GetRectangle (float top, float bottom)
 Gets a Rectangle that is altered to fit on the page. More...
 
Rectangle Rotate ()
 Swaps the values of urx and ury and of lly and llx in order to rotate the rectangle. More...
 
virtual void EnableBorderSide (int side)
 
virtual void DisableBorderSide (int side)
 
virtual float GetLeft (float margin)
 Returns the lower left x-coordinate, considering a given margin. More...
 
virtual float GetRight (float margin)
 Returns the upper right x-coordinate, considering a given margin. More...
 
virtual float GetTop (float margin)
 Returns the upper right y-coordinate, considering a given margin. More...
 
virtual float GetBottom (float margin)
 Returns the lower left y-coordinate, considering a given margin. More...
 
bool HasBorders ()
 Indicates if the table has borders. More...
 
bool HasBorder (int type)
 Indicates if the table has a some type of border. More...
 
override String ToString ()
 Gets the content of the text element. More...
 

Static Public Member Functions

static Image GetInstance (Image image)
 Gets an instance of an Image. More...
 
static Image GetInstance (Uri url)
 Gets an instance of an Image. More...
 
static Image GetInstance (Stream s)
 
static Image GetInstance (int width, int height, byte[] data, byte[] globals)
 
static Image GetInstance (byte[] imgb)
 Gets an instance of an Image. More...
 
static Image GetInstance (System.Drawing.Image image, System.Drawing.Imaging.ImageFormat format)
 Converts a .NET image to a Native(PNG, JPG, GIF, WMF) image More...
 
static Image GetInstance (System.Drawing.Image image, Color color, bool forceBW)
 Gets an instance of an Image from a System.Drwaing.Image. More...
 
static Image GetInstance (System.Drawing.Image image, Color color)
 Gets an instance of an Image from a System.Drawing.Image. More...
 
static Image GetInstance (string filename)
 Gets an instance of an Image. More...
 
static Image GetInstance (int width, int height, int components, int bpc, byte[] data)
 Gets an instance of an Image in raw mode. More...
 
static Image GetInstance (PRIndirectReference iref)
 
static Image GetInstance (PdfTemplate template)
 Gets an instance of an Image in raw mode. More...
 
static Image GetInstance (int width, int height, bool reverseBits, int typeCCITT, int parameters, byte[] data)
 Gets an instance of an Image in raw mode. More...
 
static Image GetInstance (int width, int height, bool reverseBits, int typeCCITT, int parameters, byte[] data, int[] transparency)
 
static Image GetInstance (int width, int height, int components, int bpc, byte[] data, int[] transparency)
 Gets an instance of an Image in raw mode. More...
 

Static Public Attributes

const int DEFAULT = 0
 this is a kind of image Element. More...
 
const int RIGHT_ALIGN = 2
 this is a kind of image Element. More...
 
const int LEFT_ALIGN = 0
 this is a kind of image Element. More...
 
const int MIDDLE_ALIGN = 1
 this is a kind of image Element. More...
 
const int TEXTWRAP = 4
 this is a kind of image Element. More...
 
const int UNDERLYING = 8
 this is a kind of image Element. More...
 
const int AX = 0
 This represents a coordinate in the transformation matrix. More...
 
const int AY = 1
 This represents a coordinate in the transformation matrix. More...
 
const int BX = 2
 This represents a coordinate in the transformation matrix. More...
 
const int BY = 3
 This represents a coordinate in the transformation matrix. More...
 
const int CX = 4
 This represents a coordinate in the transformation matrix. More...
 
const int CY = 5
 This represents a coordinate in the transformation matrix. More...
 
const int DX = 6
 This represents a coordinate in the transformation matrix. More...
 
const int DY = 7
 This represents a coordinate in the transformation matrix. More...
 
const int ORIGINAL_NONE = 0
 
const int ORIGINAL_JPEG = 1
 
const int ORIGINAL_PNG = 2
 
const int ORIGINAL_GIF = 3
 
const int ORIGINAL_BMP = 4
 
const int ORIGINAL_TIFF = 5
 
const int ORIGINAL_WMF = 6
 
const int ORIGINAL_JPEG2000 = 8
 
const int ORIGINAL_JBIG2 = 9
 
- Static Public Attributes inherited from iTextSharp.text.Rectangle
const int UNDEFINED = -1
 This is the value that will be used as undefined. More...
 
const int TOP_BORDER = 1
 summary> This represents one side of the border of the Rectangle. More...
 
const int BOTTOM_BORDER = 2
 summary> This represents one side of the border of the Rectangle. More...
 
const int LEFT_BORDER = 4
 summary> This represents one side of the border of the Rectangle. More...
 
const int RIGHT_BORDER = 8
 summary> This represents a rectangle without borders. More...
 
const int NO_BORDER = 0
 summary> This represents a type of border. More...
 
const int BOX = TOP_BORDER + BOTTOM_BORDER + LEFT_BORDER + RIGHT_BORDER
 
- Static Public Attributes inherited from iTextSharp.text.Element
const int HEADER = 0
 This is a possible type of Element. More...
 
const int TITLE = 1
 This is a possible type of Element. More...
 
const int SUBJECT = 2
 This is a possible type of Element. More...
 
const int KEYWORDS = 3
 This is a possible type of Element. More...
 
const int AUTHOR = 4
 This is a possible type of Element. More...
 
const int PRODUCER = 5
 This is a possible type of Element. More...
 
const int CREATIONDATE = 6
 This is a possible type of Element. More...
 
const int CREATOR = 7
 This is a possible type of Element. More...
 
const int CHUNK = 10
 This is a possible type of Element. More...
 
const int PHRASE = 11
 This is a possible type of Element. More...
 
const int PARAGRAPH = 12
 This is a possible type of Element. More...
 
const int SECTION = 13
 This is a possible type of Element More...
 
const int LIST = 14
 This is a possible type of Element More...
 
const int LISTITEM = 15
 This is a possible type of Element More...
 
const int CHAPTER = 16
 This is a possible type of Element More...
 
const int ANCHOR = 17
 This is a possible type of Element More...
 
const int CELL = 20
 This is a possible type of Element. More...
 
const int ROW = 21
 This is a possible type of Element. More...
 
const int TABLE = 22
 This is a possible type of Element. More...
 
const int PTABLE = 23
 This is a possible type of Element. More...
 
const int ANNOTATION = 29
 This is a possible type of Element. More...
 
const int RECTANGLE = 30
 This is a possible type of Element. More...
 
const int JPEG = 32
 This is a possible type of Element. More...
 
const int JPEG2000 = 33
 
const int IMGRAW = 34
 This is a possible type of Element. More...
 
const int IMGTEMPLATE = 35
 This is a possible type of Element. More...
 
const int JBIG2 = 36
 
const int MULTI_COLUMN_TEXT = 40
 This is a possible type of More...
 
const int MARKED = 50
 
const int YMARK = 55
 
const int ALIGN_UNDEFINED = -1
 A possible value for paragraph Element. This specifies that the text is aligned to the left indent and extra whitespace should be placed on the right. More...
 
const int ALIGN_LEFT = 0
 A possible value for paragraph Element. This specifies that the text is aligned to the left indent and extra whitespace should be placed on the right. More...
 
const int ALIGN_CENTER = 1
 A possible value for paragraph Element. This specifies that the text is aligned to the center and extra whitespace should be placed equally on the left and right. More...
 
const int ALIGN_RIGHT = 2
 A possible value for paragraph Element. This specifies that the text is aligned to the right indent and extra whitespace should be placed on the left. More...
 
const int ALIGN_JUSTIFIED = 3
 A possible value for paragraph Element. This specifies that extra whitespace should be spread out through the rows of the paragraph with the text lined up with the left and right indent except on the last line which should be aligned to the left. More...
 
const int ALIGN_TOP = 4
 A possible value for vertical Element. More...
 
const int ALIGN_MIDDLE = 5
 A possible value for vertical Element. More...
 
const int ALIGN_BOTTOM = 6
 A possible value for vertical Element. More...
 
const int ALIGN_BASELINE = 7
 A possible value for vertical Element. More...
 
const int ALIGN_JUSTIFIED_ALL = 8
 Does the same as ALIGN_JUSTIFIED but the last line is also spread out. More...
 
const int CCITTG4 = 0x100
 Pure two-dimensional encoding (Group 4) More...
 
const int CCITTG3_1D = 0x101
 Pure one-dimensional encoding (Group 3, 1-D) More...
 
const int CCITTG3_2D = 0x102
 Mixed one- and two-dimensional encoding (Group 3, 2-D) More...
 
const int CCITT_BLACKIS1 = 1
 A flag indicating whether 1-bits are to be interpreted as black pixels and 0-bits as white pixels, More...
 
const int CCITT_ENCODEDBYTEALIGN = 2
 A flag indicating whether the filter expects extra 0-bits before each encoded line so that the line begins on a byte boundary. More...
 
const int CCITT_ENDOFLINE = 4
 A flag indicating whether end-of-line bit patterns are required to be present in the encoding. More...
 
const int CCITT_ENDOFBLOCK = 8
 A flag indicating whether the filter expects the encoded data to be terminated by an end-of-block pattern, overriding the Rows parameter. The use of this flag will set the key /EndOfBlock to false. More...
 

Static Protected Member Functions

static long GetSerialId ()
 generates new serial id More...
 

Protected Attributes

bool invert = false
 
int type
 The imagetype. More...
 
Uri url
 The URL of the image. More...
 
byte[] rawData
 The raw data of the image. More...
 
PdfTemplate[] template = new PdfTemplate[1]
 The template to be treated as an image. More...
 
int alignment
 The alignment of the Image. More...
 
string alt
 Text that can be shown instead of the image. More...
 
float absoluteX = float.NaN
 This is the absolute X-position of the image. More...
 
float absoluteY = float.NaN
 This is the absolute Y-position of the image. More...
 
float plainWidth
 This is the width of the image without rotation. More...
 
float plainHeight
 This is the width of the image without rotation. More...
 
float scaledWidth
 This is the scaled width of the image taking rotation into account. More...
 
float scaledHeight
 This is the original height of the image taking rotation into account. More...
 
int compressionLevel = PdfStream.DEFAULT_COMPRESSION
 
float rotationRadians
 This is the rotation of the image. More...
 
int colorspace = -1
 this is the colorspace of a jpeg-image. More...
 
int bpc = 1
 this is the bits per component of the raw image. It also flags a CCITT image. More...
 
int[] transparency
 this is the transparency information of the raw image More...
 
float indentationLeft = 0
 
float indentationRight = 0
 
long mySerialId = GetSerialId()
 
int dpiX = 0
 Holds value of property dpiX. More...
 
int dpiY = 0
 Holds value of property dpiY. More...
 
bool mask = false
 
Image imageMask
 
bool interpolation
 Holds value of property interpolation. More...
 
Annotation annotation = null
 if the annotation is not null the image will be clickable. More...
 
ICC_Profile profile = null
 ICC Profile attached More...
 
bool deflated = false
 
int originalType = ORIGINAL_NONE
 
byte[] originalData
 
float spacingBefore
 
float spacingAfter
 
IPdfOCG layer
 
- Protected Attributes inherited from iTextSharp.text.Rectangle
float llx
 the lower left x-coordinate. More...
 
float lly
 summary> the upper right x-coordinate. More...
 
float urx
 summary> the upper right y-coordinate. More...
 
float ury
 summary> This represents the status of the 4 sides of the rectangle. More...
 
int border = UNDEFINED
 summary> This is the width of the border around this rectangle. More...
 
float borderWidth = UNDEFINED
 summary> This is the color of the border of this rectangle. More...
 
Color borderColor = null
 
Color borderColorLeft = null
 
Color borderColorRight = null
 
Color borderColorTop = null
 
Color borderColorBottom = null
 
float borderWidthLeft = UNDEFINED
 
float borderWidthRight = UNDEFINED
 
float borderWidthTop = UNDEFINED
 
float borderWidthBottom = UNDEFINED
 
bool useVariableBorders = false
 summary> This is the color of the background of this rectangle. More...
 
Color backgroundColor = null
 summary> This is the rotation value of this rectangle. More...
 
int rotation = 0
 

Properties

new float Rotation [set]
 Sets the rotation of the image in radians. More...
 
float RotationDegrees [set]
 Sets the rotation of the image in degrees. More...
 
Annotation Annotation [get, set]
 Get/set the annotation. More...
 
int Bpc [get]
 Gets the bpc for the image. More...
 
byte[] RawData [get]
 Gets the raw data for the image. More...
 
PdfTemplate TemplateData [get, set]
 Get/set the template to be used as an image. More...
 
float AbsoluteX [get]
 Returns the absolute X position. More...
 
float AbsoluteY [get]
 Returns the absolute Y position. More...
 
override int Type [get]
 Returns the type. More...
 
Uri Url [get, set]
 Gets the string-representation of the reference to the image. More...
 
int Alignment [get, set]
 Get/set the alignment for the image. More...
 
string Alt [get, set]
 Get/set the alternative text for the image. More...
 
float ScaledWidth [get]
 Gets the scaled width of the image. More...
 
float ScaledHeight [get]
 Gets the scaled height of the image. More...
 
int Colorspace [get]
 Gets the colorspace for the image. More...
 
float[] Matrix [get]
 Returns the transformation matrix of the image. More...
 
int[] Transparency [get, set]
 Returns the transparency. More...
 
float PlainWidth [get]
 Gets the plain width of the image. More...
 
float PlainHeight [get]
 Gets the plain height of the image. More...
 
long MySerialId [get]
 returns serial id for this object More...
 
int DpiX [get]
 Gets the dots-per-inch in the X direction. Returns 0 if not available. More...
 
int DpiY [get]
 Gets the dots-per-inch in the Y direction. Returns 0 if not available. More...
 
ImageImageMask [get, set]
 Get/set the explicit masking. More...
 
bool Inverted [get, set]
 Inverts the meaning of the bits of a mask. More...
 
bool Interpolation [get, set]
 Sets the image interpolation. Image interpolation attempts to produce a smooth transition between adjacent sample values. More...
 
ICC_Profile TagICC [get, set]
 
bool Deflated [get, set]
 
PdfDictionary Additional [get, set]
 
bool Smask [get, set]
 
float XYRatio [get, set]
 
float IndentationLeft [get, set]
 
float IndentationRight [get, set]
 
int OriginalType [get, set]
 
byte[] OriginalData [get, set]
 
float SpacingBefore [get, set]
 
float SpacingAfter [get, set]
 
float WidthPercentage [get, set]
 
IPdfOCG Layer [get, set]
 
float InitialRotation [get, set]
 
PdfIndirectReference DirectReference [get, set]
 
int CompressionLevel [get, set]
 
- Properties inherited from iTextSharp.text.Rectangle
virtual int Type [get]
 Gets the type of the text element. More...
 
virtual ArrayList Chunks [get]
 Gets all the chunks in this element. More...
 
virtual float Top [get, set]
 Get/set the upper right y-coordinate. More...
 
virtual int Border [get, set]
 Get/set the border More...
 
virtual float GrayFill [get, set]
 Get/set the grayscale of the rectangle. More...
 
virtual float Left [get, set]
 Get/set the lower left x-coordinate. More...
 
virtual float Right [get, set]
 Get/set the upper right x-coordinate. More...
 
virtual float Bottom [get, set]
 Get/set the lower left y-coordinate. More...
 
virtual Color BorderColorBottom [get, set]
 
virtual Color BorderColorTop [get, set]
 
virtual Color BorderColorLeft [get, set]
 
virtual Color BorderColorRight [get, set]
 
virtual float Width [get, set]
 Returns the width of the rectangle. More...
 
float Height [get]
 Returns the height of the rectangle. More...
 
virtual float BorderWidth [get, set]
 Get/set the borderwidth. More...
 
virtual Color BorderColor [get, set]
 Get/set the color of the border. More...
 
virtual Color BackgroundColor [get, set]
 Get/set the backgroundcolor. More...
 
int Rotation [get]
 Returns the rotation More...
 
virtual float BorderWidthLeft [get, set]
 
virtual float BorderWidthRight [get, set]
 
virtual float BorderWidthTop [get, set]
 
virtual float BorderWidthBottom [get, set]
 
virtual bool UseVariableBorders [get, set]
 
- Properties inherited from iTextSharp.text.IElement
int Type [get]
 Gets the type of the text element. More...
 
ArrayList Chunks [get]
 Gets all the chunks in this element. More...
 

Detailed Description

An Image is the representation of a graphic element (JPEG, PNG or GIF) that has to be inserted into the document

See also
T:iTextSharp.text.Element, T:iTextSharp.text.Rectangle

Constructor & Destructor Documentation

◆ Image() [1/2]

iTextSharp.text.Image.Image ( Uri  url)

Constructs an Image-object, using an url.

Parameters
urlthe URL where the image can be found.

◆ Image() [2/2]

iTextSharp.text.Image.Image ( Image  image)

Constructs an Image object duplicate.

Parameters
imageanother Image object.

Member Function Documentation

◆ GetImageRotation()

float iTextSharp.text.Image.GetImageRotation ( )

Gets the current image rotation in radians.

Returns
the current image rotation in radians

◆ GetInstance() [1/15]

static Image iTextSharp.text.Image.GetInstance ( byte[]  imgb)
static

Gets an instance of an Image.

Parameters
imga byte array
Returns
an object of type Gif, Jpeg or Png

◆ GetInstance() [2/15]

static Image iTextSharp.text.Image.GetInstance ( Image  image)
static

Gets an instance of an Image.

Parameters
imagean Image
Returns
an object of type Gif, Jpeg or Png

◆ GetInstance() [3/15]

static Image iTextSharp.text.Image.GetInstance ( int  width,
int  height,
bool  reverseBits,
int  typeCCITT,
int  parameters,
byte[]  data 
)
static

Gets an instance of an Image in raw mode.

Parameters
widththe width of the image in pixels
heightthe height of the image in pixels
reverseBits
typeCCITT
parameters
data
Returns

◆ GetInstance() [4/15]

static Image iTextSharp.text.Image.GetInstance ( int  width,
int  height,
bool  reverseBits,
int  typeCCITT,
int  parameters,
byte[]  data,
int[]  transparency 
)
static

Parameters
width
height
reverseBits
typeCCITT
parameters
data
transparency
Returns

◆ GetInstance() [5/15]

static Image iTextSharp.text.Image.GetInstance ( int  width,
int  height,
byte[]  data,
byte[]  globals 
)
static

Creates a JBIG2 Image.

Parameters
widththe width of the image
heightthe height of the image
datathe raw image data
globalsJBIG2 globals
Since
2.1.5

◆ GetInstance() [6/15]

static Image iTextSharp.text.Image.GetInstance ( int  width,
int  height,
int  components,
int  bpc,
byte[]  data 
)
static

Gets an instance of an Image in raw mode.

Parameters
widththe width of the image in pixels
heightthe height of the image in pixels
components1,3 or 4 for GrayScale, RGB and CMYK
bpcbits per component
datathe image data
Returns
an object of type ImgRaw

◆ GetInstance() [7/15]

static Image iTextSharp.text.Image.GetInstance ( int  width,
int  height,
int  components,
int  bpc,
byte[]  data,
int[]  transparency 
)
static

Gets an instance of an Image in raw mode.

Parameters
widththe width of the image in pixels
heightthe height of the image in pixels
components1,3 or 4 for GrayScale, RGB and CMYK
bpcbits per component
datathe image data
transparencytransparency information in the Mask format of the image dictionary
Returns
an object of type ImgRaw

◆ GetInstance() [8/15]

static Image iTextSharp.text.Image.GetInstance ( PdfTemplate  template)
static

Gets an instance of an Image in raw mode.

Parameters
template
Returns

◆ GetInstance() [9/15]

static Image iTextSharp.text.Image.GetInstance ( PRIndirectReference  iref)
static

Reuses an existing image.

Parameters
refthe reference to the image dictionary
Exceptions
BadElementExceptionon error
Returns
the image

◆ GetInstance() [10/15]

static Image iTextSharp.text.Image.GetInstance ( Stream  s)
static

◆ GetInstance() [11/15]

static Image iTextSharp.text.Image.GetInstance ( string  filename)
static

Gets an instance of an Image.

Parameters
filenamea filename
Returns
an object of type Gif, Jpeg or Png

◆ GetInstance() [12/15]

static Image iTextSharp.text.Image.GetInstance ( System.Drawing.Image  image,
Color  color 
)
static

Gets an instance of an Image from a System.Drawing.Image.

Parameters
imagethe System.Drawing.Image to convert
colorif different from null the transparency pixels are replaced by this color
Returns
an object of type ImgRaw

◆ GetInstance() [13/15]

static Image iTextSharp.text.Image.GetInstance ( System.Drawing.Image  image,
Color  color,
bool  forceBW 
)
static

Gets an instance of an Image from a System.Drwaing.Image.

Parameters
imagethe System.Drawing.Image to convert
colorif different from null the transparency pixels are replaced by this color
forceBWif true the image is treated as black and white
Returns
an object of type ImgRaw

◆ GetInstance() [14/15]

static Image iTextSharp.text.Image.GetInstance ( System.Drawing.Image  image,
System.Drawing.Imaging.ImageFormat  format 
)
static

Converts a .NET image to a Native(PNG, JPG, GIF, WMF) image

Parameters
image
?
Returns

◆ GetInstance() [15/15]

static Image iTextSharp.text.Image.GetInstance ( Uri  url)
static

Gets an instance of an Image.

Parameters
urlan URL
Returns
an object of type Gif, Jpeg or Png

◆ GetSerialId()

static long iTextSharp.text.Image.GetSerialId ( )
staticprotected

generates new serial id

◆ HasAbsolutePosition()

bool iTextSharp.text.Image.HasAbsolutePosition ( )

Checks if the Images has to be added at an absolute position.

Returns
a bool

◆ HasAbsoluteX()

bool iTextSharp.text.Image.HasAbsoluteX ( )

Checks if the Images has to be added at an absolute X position.

Returns
a bool

◆ HasICCProfile()

bool iTextSharp.text.Image.HasICCProfile ( )

Checks is the image has an ICC profile.

Returns
the ICC profile or null

◆ IsImgRaw()

bool iTextSharp.text.Image.IsImgRaw ( )

Returns true if the image is a ImgRaw-object.

Returns
a bool

◆ IsImgTemplate()

bool iTextSharp.text.Image.IsImgTemplate ( )

Returns true if the image is an ImgTemplate-object.

Returns
a bool

◆ IsJpeg()

bool iTextSharp.text.Image.IsJpeg ( )

Returns true if the image is a Jpeg-object.

Returns
a bool

◆ IsMask()

bool iTextSharp.text.Image.IsMask ( )

Returns true if this Image is a mask.

Returns
true if this Image is a mask

◆ IsMaskCandidate()

bool iTextSharp.text.Image.IsMaskCandidate ( )

Returns true if this Image has the requisites to be a mask.

Returns
true if this Image can be a mask

◆ IsNestable()

override bool iTextSharp.text.Image.IsNestable ( )
virtual
See also
com.lowagie.text.Element::isNestable()
Since
iText 2.0.8

Reimplemented from iTextSharp.text.Rectangle.

◆ MakeMask()

void iTextSharp.text.Image.MakeMask ( )

Make this Image a mask.

◆ ScaleAbsolute()

void iTextSharp.text.Image.ScaleAbsolute ( float  newWidth,
float  newHeight 
)

Scale the image to an absolute width and an absolute height.

Parameters
newWidththe new width
newHeightthe new height

◆ ScaleAbsoluteHeight()

void iTextSharp.text.Image.ScaleAbsoluteHeight ( float  newHeight)

Scale the image to an absolute height.

Parameters
newHeightthe new height

◆ ScaleAbsoluteWidth()

void iTextSharp.text.Image.ScaleAbsoluteWidth ( float  newWidth)

Scale the image to an absolute width.

Parameters
newWidththe new width

◆ ScalePercent() [1/2]

void iTextSharp.text.Image.ScalePercent ( float  percent)

Scale the image to a certain percentage.

Parameters
percentthe scaling percentage

◆ ScalePercent() [2/2]

void iTextSharp.text.Image.ScalePercent ( float  percentX,
float  percentY 
)

Scale the width and height of an image to a certain percentage.

Parameters
percentXthe scaling percentage of the width
percentYthe scaling percentage of the height

◆ ScaleToFit()

void iTextSharp.text.Image.ScaleToFit ( float  fitWidth,
float  fitHeight 
)

Scales the image so that it fits a certain width and height.

Parameters
fitWidththe width to fit
fitHeightthe height to fit

◆ SetAbsolutePosition()

void iTextSharp.text.Image.SetAbsolutePosition ( float  absoluteX,
float  absoluteY 
)

Sets the absolute position of the Image.

Parameters
absoluteX
absoluteY

◆ SetDpi()

void iTextSharp.text.Image.SetDpi ( int  dpiX,
int  dpiY 
)

Sets the dots per inch value

Parameters
dpiXdpi for x coordinates
dpiYdpi for y coordinates

◆ SimplifyColorspace()

void iTextSharp.text.Image.SimplifyColorspace ( )

Replaces CalRGB and CalGray colorspaces with DeviceRGB and DeviceGray.

Member Data Documentation

◆ absoluteX

float iTextSharp.text.Image.absoluteX = float.NaN
protected

This is the absolute X-position of the image.

◆ absoluteY

float iTextSharp.text.Image.absoluteY = float.NaN
protected

This is the absolute Y-position of the image.

◆ alignment

int iTextSharp.text.Image.alignment
protected

The alignment of the Image.

◆ alt

string iTextSharp.text.Image.alt
protected

Text that can be shown instead of the image.

◆ annotation

Annotation iTextSharp.text.Image.annotation = null
protected

if the annotation is not null the image will be clickable.

◆ AX

const int iTextSharp.text.Image.AX = 0
static

This represents a coordinate in the transformation matrix.

◆ AY

const int iTextSharp.text.Image.AY = 1
static

This represents a coordinate in the transformation matrix.

◆ bpc

int iTextSharp.text.Image.bpc = 1
protected

this is the bits per component of the raw image. It also flags a CCITT image.

◆ BX

const int iTextSharp.text.Image.BX = 2
static

This represents a coordinate in the transformation matrix.

◆ BY

const int iTextSharp.text.Image.BY = 3
static

This represents a coordinate in the transformation matrix.

◆ colorspace

int iTextSharp.text.Image.colorspace = -1
protected

this is the colorspace of a jpeg-image.

◆ compressionLevel

int iTextSharp.text.Image.compressionLevel = PdfStream.DEFAULT_COMPRESSION
protected

The compression level of the content streams.

Since
2.1.3

◆ CX

const int iTextSharp.text.Image.CX = 4
static

This represents a coordinate in the transformation matrix.

◆ CY

const int iTextSharp.text.Image.CY = 5
static

This represents a coordinate in the transformation matrix.

◆ DEFAULT

const int iTextSharp.text.Image.DEFAULT = 0
static

this is a kind of image Element.

◆ deflated

bool iTextSharp.text.Image.deflated = false
protected

Holds value of property deflated.

◆ dpiX

int iTextSharp.text.Image.dpiX = 0
protected

Holds value of property dpiX.

◆ dpiY

int iTextSharp.text.Image.dpiY = 0
protected

Holds value of property dpiY.

◆ DX

const int iTextSharp.text.Image.DX = 6
static

This represents a coordinate in the transformation matrix.

◆ DY

const int iTextSharp.text.Image.DY = 7
static

This represents a coordinate in the transformation matrix.

◆ imageMask

Image iTextSharp.text.Image.imageMask
protected

◆ indentationLeft

float iTextSharp.text.Image.indentationLeft = 0
protected

the indentation to the left.

◆ indentationRight

float iTextSharp.text.Image.indentationRight = 0
protected

the indentation to the right.

◆ interpolation

bool iTextSharp.text.Image.interpolation
protected

Holds value of property interpolation.

◆ invert

bool iTextSharp.text.Image.invert = false
protected

Image color inversion

◆ layer

IPdfOCG iTextSharp.text.Image.layer
protected

◆ LEFT_ALIGN

const int iTextSharp.text.Image.LEFT_ALIGN = 0
static

this is a kind of image Element.

◆ mask

bool iTextSharp.text.Image.mask = false
protected

◆ MIDDLE_ALIGN

const int iTextSharp.text.Image.MIDDLE_ALIGN = 1
static

this is a kind of image Element.

◆ mySerialId

long iTextSharp.text.Image.mySerialId = GetSerialId()
protected

◆ ORIGINAL_BMP

const int iTextSharp.text.Image.ORIGINAL_BMP = 4
static

type of image

◆ ORIGINAL_GIF

const int iTextSharp.text.Image.ORIGINAL_GIF = 3
static

type of image

◆ ORIGINAL_JBIG2

const int iTextSharp.text.Image.ORIGINAL_JBIG2 = 9
static

type of image

Since
2.1.5

◆ ORIGINAL_JPEG

const int iTextSharp.text.Image.ORIGINAL_JPEG = 1
static

type of image

◆ ORIGINAL_JPEG2000

const int iTextSharp.text.Image.ORIGINAL_JPEG2000 = 8
static

type of image

◆ ORIGINAL_NONE

const int iTextSharp.text.Image.ORIGINAL_NONE = 0
static

type of image

◆ ORIGINAL_PNG

const int iTextSharp.text.Image.ORIGINAL_PNG = 2
static

type of image

◆ ORIGINAL_TIFF

const int iTextSharp.text.Image.ORIGINAL_TIFF = 5
static

type of image

◆ ORIGINAL_WMF

const int iTextSharp.text.Image.ORIGINAL_WMF = 6
static

type of image

◆ originalData

byte [] iTextSharp.text.Image.originalData
protected

Holds value of property originalData.

◆ originalType

int iTextSharp.text.Image.originalType = ORIGINAL_NONE
protected

Holds value of property originalType.

◆ plainHeight

float iTextSharp.text.Image.plainHeight
protected

This is the width of the image without rotation.

◆ plainWidth

float iTextSharp.text.Image.plainWidth
protected

This is the width of the image without rotation.

◆ profile

ICC_Profile iTextSharp.text.Image.profile = null
protected

ICC Profile attached

◆ rawData

byte [] iTextSharp.text.Image.rawData
protected

The raw data of the image.

◆ RIGHT_ALIGN

const int iTextSharp.text.Image.RIGHT_ALIGN = 2
static

this is a kind of image Element.

◆ rotationRadians

float iTextSharp.text.Image.rotationRadians
protected

This is the rotation of the image.

◆ scaledHeight

float iTextSharp.text.Image.scaledHeight
protected

This is the original height of the image taking rotation into account.

◆ scaledWidth

float iTextSharp.text.Image.scaledWidth
protected

This is the scaled width of the image taking rotation into account.

◆ spacingAfter

float iTextSharp.text.Image.spacingAfter
protected

The spacing after the image.

◆ spacingBefore

float iTextSharp.text.Image.spacingBefore
protected

The spacing before the image.

◆ template

PdfTemplate [] iTextSharp.text.Image.template = new PdfTemplate[1]
protected

The template to be treated as an image.

◆ TEXTWRAP

const int iTextSharp.text.Image.TEXTWRAP = 4
static

this is a kind of image Element.

◆ transparency

int [] iTextSharp.text.Image.transparency
protected

this is the transparency information of the raw image

◆ type

int iTextSharp.text.Image.type
protected

The imagetype.

◆ UNDERLYING

const int iTextSharp.text.Image.UNDERLYING = 8
static

this is a kind of image Element.

◆ url

Uri iTextSharp.text.Image.url
protected

The URL of the image.

Property Documentation

◆ AbsoluteX

float iTextSharp.text.Image.AbsoluteX
get

Returns the absolute X position.

a position

◆ AbsoluteY

float iTextSharp.text.Image.AbsoluteY
get

Returns the absolute Y position.

a position

◆ Additional

PdfDictionary iTextSharp.text.Image.Additional
getset

◆ Alignment

int iTextSharp.text.Image.Alignment
getset

Get/set the alignment for the image.

a value

◆ Alt

string iTextSharp.text.Image.Alt
getset

Get/set the alternative text for the image.

a string

◆ Annotation

Annotation iTextSharp.text.Image.Annotation
getset

Get/set the annotation.

the Annotation

◆ Bpc

int iTextSharp.text.Image.Bpc
get

Gets the bpc for the image.

this only makes sense for Images of the type RawImage.

a bpc value

◆ Colorspace

int iTextSharp.text.Image.Colorspace
get

Gets the colorspace for the image.

this only makes sense for Images of the type Jpeg.

a colorspace value

◆ CompressionLevel

int iTextSharp.text.Image.CompressionLevel
getset

Sets the compression level to be used if the image is written as a compressed stream.

Parameters
compressionLevela value between 0 (best speed) and 9 (best compression)
Since
2.1.3

◆ Deflated

bool iTextSharp.text.Image.Deflated
getset

◆ DirectReference

PdfIndirectReference iTextSharp.text.Image.DirectReference
getset

◆ DpiX

int iTextSharp.text.Image.DpiX
get

Gets the dots-per-inch in the X direction. Returns 0 if not available.

the dots-per-inch in the X direction

◆ DpiY

int iTextSharp.text.Image.DpiY
get

Gets the dots-per-inch in the Y direction. Returns 0 if not available.

the dots-per-inch in the Y direction

◆ ImageMask

Image? iTextSharp.text.Image.ImageMask
getset

Get/set the explicit masking.

the explicit masking

◆ IndentationLeft

float iTextSharp.text.Image.IndentationLeft
getset

◆ IndentationRight

float iTextSharp.text.Image.IndentationRight
getset

◆ InitialRotation

float iTextSharp.text.Image.InitialRotation
getset

Some image formats, like TIFF may present the images rotated that have to be compensated.

◆ Interpolation

bool iTextSharp.text.Image.Interpolation
getset

Sets the image interpolation. Image interpolation attempts to produce a smooth transition between adjacent sample values.

New value of property interpolation.

◆ Inverted

bool iTextSharp.text.Image.Inverted
getset

Inverts the meaning of the bits of a mask.

true to invert the meaning of the bits of a mask

◆ Layer

IPdfOCG iTextSharp.text.Image.Layer
getset

◆ Matrix

float [] iTextSharp.text.Image.Matrix
get

Returns the transformation matrix of the image.

an array [AX, AY, BX, BY, CX, CY, DX, DY]

◆ MySerialId

long iTextSharp.text.Image.MySerialId
get

returns serial id for this object

◆ OriginalData

byte [] iTextSharp.text.Image.OriginalData
getset

◆ OriginalType

int iTextSharp.text.Image.OriginalType
getset

◆ PlainHeight

float iTextSharp.text.Image.PlainHeight
get

Gets the plain height of the image.

a value

◆ PlainWidth

float iTextSharp.text.Image.PlainWidth
get

Gets the plain width of the image.

a value

◆ RawData

byte [] iTextSharp.text.Image.RawData
get

Gets the raw data for the image.

this only makes sense for Images of the type RawImage.

the raw data

◆ Rotation

new float iTextSharp.text.Image.Rotation
set

Sets the rotation of the image in radians.

Parameters
rrotation in radians

◆ RotationDegrees

float iTextSharp.text.Image.RotationDegrees
set

Sets the rotation of the image in degrees.

Parameters
degrotation in degrees

◆ ScaledHeight

float iTextSharp.text.Image.ScaledHeight
get

Gets the scaled height of the image.

a value

◆ ScaledWidth

float iTextSharp.text.Image.ScaledWidth
get

Gets the scaled width of the image.

a value

◆ Smask

bool iTextSharp.text.Image.Smask
getset

◆ SpacingAfter

float iTextSharp.text.Image.SpacingAfter
getset

◆ SpacingBefore

float iTextSharp.text.Image.SpacingBefore
getset

◆ TagICC

ICC_Profile iTextSharp.text.Image.TagICC
getset

Tags this image with an ICC profile.

Parameters
profilethe profile

◆ TemplateData

PdfTemplate iTextSharp.text.Image.TemplateData
getset

Get/set the template to be used as an image.

this only makes sense for Images of the type ImgTemplate.

the template

◆ Transparency

int [] iTextSharp.text.Image.Transparency
getset

Returns the transparency.

the transparency

◆ Type

override int iTextSharp.text.Image.Type
get

Returns the type.

a type

◆ Url

Uri iTextSharp.text.Image.Url
getset

Gets the string-representation of the reference to the image.

a string

◆ WidthPercentage

float iTextSharp.text.Image.WidthPercentage
getset

◆ XYRatio

float iTextSharp.text.Image.XYRatio
getset

The documentation for this class was generated from the following file: