C# Class iTextSharp.text.Image

An Image is the representation of a graphic element (JPEG, PNG or GIF) that has to be inserted into the document
Inheritance: Rectangle
ファイルを表示 Open project: mapo80/iTextSharp-Monotouch Class Usage Examples

Protected Properties

Property Type Description
absoluteX float
absoluteY float
alignment int
alt string
annotation Annotation
bpc int
colorspace int
compressionLevel int
deflated bool
dpiX int
dpiY int
imageMask Image
indentationLeft float
indentationRight float
interpolation bool
invert bool
layer IPdfOCG
mask bool
mySerialId long
originalData byte[]
originalType int
plainHeight float
plainWidth float
profile iTextSharp.text.pdf.ICC_Profile
rawData byte[]
rotationRadians float
scaleToFitLineWhenOverflow bool
scaledHeight float
scaledWidth float
spacingAfter float
spacingBefore float
template iTextSharp.text.pdf.PdfTemplate[]
transparency int[]
type int
url System.Uri

Public Methods

Method Description
GetImageRotation ( ) : float
GetInstance ( Image image ) : Image

Gets an instance of an Image.

GetInstance ( PRIndirectReference iref ) : Image
GetInstance ( PdfTemplate template ) : Image

Gets an instance of an Image in raw mode.

GetInstance ( Stream s ) : Image
GetInstance ( System image, BaseColor color ) : Image

Gets an instance of an Image from a Image.

GetInstance ( System image, BaseColor color, bool forceBW ) : Image

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

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

GetInstance ( Uri url ) : Image

Gets an instance of an Image.

GetInstance ( byte imgb ) : Image

Gets an instance of an Image.

GetInstance ( int width, int height, bool reverseBits, int typeCCITT, int parameters, byte data ) : Image

Gets an instance of an Image in raw mode.

GetInstance ( int width, int height, bool reverseBits, int typeCCITT, int parameters, byte data, int transparency ) : Image

GetInstance ( int width, int height, byte data, byte globals ) : Image
GetInstance ( int width, int height, int components, int bpc, byte data ) : Image

Gets an instance of an Image in raw mode.

GetInstance ( int width, int height, int components, int bpc, byte data, int transparency ) : Image

Gets an instance of an Image in raw mode.

GetInstance ( string filename ) : Image

Gets an instance of an Image.

HasAbsolutePosition ( ) : bool

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

HasAbsoluteX ( ) : bool

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

HasICCProfile ( ) : bool
Image ( Image image ) : System

Constructs an Image object duplicate.

Image ( Uri url ) : System

Constructs an Image-object, using an url.

IsImgRaw ( ) : bool

Returns true if the image is a ImgRaw-object.

IsImgTemplate ( ) : bool

Returns true if the image is an ImgTemplate-object.

IsJpeg ( ) : bool

Returns true if the image is a Jpeg-object.

IsMask ( ) : bool

Returns true if this Image is a mask.

IsMaskCandidate ( ) : bool

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

IsNestable ( ) : bool
MakeMask ( ) : void

Make this Image a mask.

ScaleAbsolute ( float newWidth, float newHeight ) : void

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

ScaleAbsoluteHeight ( float newHeight ) : void

Scale the image to an absolute height.

ScaleAbsoluteWidth ( float newWidth ) : void

Scale the image to an absolute width.

ScalePercent ( float percent ) : void

Scale the image to a certain percentage.

ScalePercent ( float percentX, float percentY ) : void

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

ScaleToFit ( float fitWidth, float fitHeight ) : void

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

SetAbsolutePosition ( float absoluteX, float absoluteY ) : void

Sets the absolute position of the Image.

SetDpi ( int dpiX, int dpiY ) : void
SimplifyColorspace ( ) : void

Protected Methods

Method Description
GetSerialId ( ) : long

generates new serial id

Private Methods

Method Description
SimplifyColorspace ( PdfArray obj ) : PdfObject

Method Details

GetImageRotation() public method

public GetImageRotation ( ) : float
return float

GetInstance() public static method

Gets an instance of an Image.
public static GetInstance ( Image image ) : Image
image Image an Image
return Image

GetInstance() public static method

public static GetInstance ( PRIndirectReference iref ) : Image
iref iTextSharp.text.pdf.PRIndirectReference
return Image

GetInstance() public static method

Gets an instance of an Image in raw mode.
public static GetInstance ( PdfTemplate template ) : Image
template iTextSharp.text.pdf.PdfTemplate
return Image

GetInstance() public static method

public static GetInstance ( Stream s ) : Image
s Stream
return Image

GetInstance() public static method

Gets an instance of an Image from a Image.
public static GetInstance ( System image, BaseColor color ) : Image
image System the Image to convert
color BaseColor /// if different from null the transparency /// pixels are replaced by this color ///
return Image

GetInstance() public static method

Converts a .NET image to a Native(PNG, JPG, GIF, WMF) image Gets an instance of an Image from a System.Drwaing.Image.
public static GetInstance ( System image, BaseColor color, bool forceBW ) : Image
image System
color BaseColor /// if different from null the transparency /// pixels are replaced by this color ///
forceBW bool if true the image is treated as black and white
return Image

GetInstance() public static method

Gets an instance of an Image.
public static GetInstance ( Uri url ) : Image
url System.Uri an URL
return Image

GetInstance() public static method

Gets an instance of an Image.
public static GetInstance ( byte imgb ) : Image
imgb byte
return Image

GetInstance() public static method

Gets an instance of an Image in raw mode.
public static GetInstance ( int width, int height, bool reverseBits, int typeCCITT, int parameters, byte data ) : Image
width int the width of the image in pixels
height int the height of the image in pixels
reverseBits bool
typeCCITT int
parameters int
data byte
return Image

GetInstance() public static method

public static GetInstance ( int width, int height, bool reverseBits, int typeCCITT, int parameters, byte data, int transparency ) : Image
width int
height int
reverseBits bool
typeCCITT int
parameters int
data byte
transparency int
return Image

GetInstance() public static method

public static GetInstance ( int width, int height, byte data, byte globals ) : Image
width int
height int
data byte
globals byte
return Image

GetInstance() public static method

Gets an instance of an Image in raw mode.
public static GetInstance ( int width, int height, int components, int bpc, byte data ) : Image
width int the width of the image in pixels
height int the height of the image in pixels
components int 1,3 or 4 for GrayScale, RGB and CMYK
bpc int bits per component
data byte the image data
return Image

GetInstance() public static method

Gets an instance of an Image in raw mode.
public static GetInstance ( int width, int height, int components, int bpc, byte data, int transparency ) : Image
width int the width of the image in pixels
height int the height of the image in pixels
components int 1,3 or 4 for GrayScale, RGB and CMYK
bpc int bits per component
data byte the image data
transparency int /// transparency information in the Mask format of the /// image dictionary ///
return Image

GetInstance() public static method

Gets an instance of an Image.
public static GetInstance ( string filename ) : Image
filename string a filename
return Image

GetSerialId() protected static method

generates new serial id
protected static GetSerialId ( ) : long
return long

HasAbsolutePosition() public method

Checks if the Images has to be added at an absolute position.
public HasAbsolutePosition ( ) : bool
return bool

HasAbsoluteX() public method

Checks if the Images has to be added at an absolute X position.
public HasAbsoluteX ( ) : bool
return bool

HasICCProfile() public method

public HasICCProfile ( ) : bool
return bool

Image() public method

Constructs an Image object duplicate.
public Image ( Image image ) : System
image Image another Image object.
return System

Image() public method

Constructs an Image-object, using an url.
public Image ( Uri url ) : System
url System.Uri the URL where the image can be found.
return System

IsImgRaw() public method

Returns true if the image is a ImgRaw-object.
public IsImgRaw ( ) : bool
return bool

IsImgTemplate() public method

Returns true if the image is an ImgTemplate-object.
public IsImgTemplate ( ) : bool
return bool

IsJpeg() public method

Returns true if the image is a Jpeg-object.
public IsJpeg ( ) : bool
return bool

IsMask() public method

Returns true if this Image is a mask.
public IsMask ( ) : bool
return bool

IsMaskCandidate() public method

Returns true if this Image has the requisites to be a mask.
public IsMaskCandidate ( ) : bool
return bool

IsNestable() public method

public IsNestable ( ) : bool
return bool

MakeMask() public method

Make this Image a mask.
public MakeMask ( ) : void
return void

ScaleAbsolute() public method

Scale the image to an absolute width and an absolute height.
public ScaleAbsolute ( float newWidth, float newHeight ) : void
newWidth float the new width
newHeight float the new height
return void

ScaleAbsoluteHeight() public method

Scale the image to an absolute height.
public ScaleAbsoluteHeight ( float newHeight ) : void
newHeight float the new height
return void

ScaleAbsoluteWidth() public method

Scale the image to an absolute width.
public ScaleAbsoluteWidth ( float newWidth ) : void
newWidth float the new width
return void

ScalePercent() public method

Scale the image to a certain percentage.
public ScalePercent ( float percent ) : void
percent float the scaling percentage
return void

ScalePercent() public method

Scale the width and height of an image to a certain percentage.
public ScalePercent ( float percentX, float percentY ) : void
percentX float the scaling percentage of the width
percentY float the scaling percentage of the height
return void

ScaleToFit() public method

Scales the image so that it fits a certain width and height.
public ScaleToFit ( float fitWidth, float fitHeight ) : void
fitWidth float the width to fit
fitHeight float the height to fit
return void

SetAbsolutePosition() public method

Sets the absolute position of the Image.
public SetAbsolutePosition ( float absoluteX, float absoluteY ) : void
absoluteX float
absoluteY float
return void

SetDpi() public method

public SetDpi ( int dpiX, int dpiY ) : void
dpiX int
dpiY int
return void

SimplifyColorspace() public method

public SimplifyColorspace ( ) : void
return void

Property Details

absoluteX protected_oe property

This is the absolute X-position of the image.
protected float absoluteX
return float

absoluteY protected_oe property

This is the absolute Y-position of the image.
protected float absoluteY
return float

alignment protected_oe property

The alignment of the Image.
protected int alignment
return int

alt protected_oe property

Text that can be shown instead of the image.
protected string alt
return string

annotation protected_oe property

if the annotation is not null the image will be clickable.
protected Annotation,iTextSharp.text annotation
return Annotation

bpc protected_oe property

this is the bits per component of the raw image. It also flags a CCITT image.
protected int bpc
return int

colorspace protected_oe property

this is the colorspace of a jpeg-image.
protected int colorspace
return int

compressionLevel protected_oe property

protected int compressionLevel
return int

deflated protected_oe property

protected bool deflated
return bool

dpiX protected_oe property

Holds value of property dpiX.
protected int dpiX
return int

dpiY protected_oe property

Holds value of property dpiY.
protected int dpiY
return int

imageMask protected_oe property

protected Image imageMask
return Image

indentationLeft protected_oe property

protected float indentationLeft
return float

indentationRight protected_oe property

protected float indentationRight
return float

interpolation protected_oe property

Holds value of property interpolation.
protected bool interpolation
return bool

invert protected_oe property

protected bool invert
return bool

layer protected_oe property

protected IPdfOCG layer
return IPdfOCG

mask protected_oe property

protected bool mask
return bool

mySerialId protected_oe property

protected long mySerialId
return long

originalData protected_oe property

protected byte[] originalData
return byte[]

originalType protected_oe property

protected int originalType
return int

plainHeight protected_oe property

This is the width of the image without rotation.
protected float plainHeight
return float

plainWidth protected_oe property

This is the width of the image without rotation.
protected float plainWidth
return float

profile protected_oe property

ICC Profile attached
protected ICC_Profile,iTextSharp.text.pdf profile
return iTextSharp.text.pdf.ICC_Profile

rawData protected_oe property

The raw data of the image.
protected byte[] rawData
return byte[]

rotationRadians protected_oe property

This is the rotation of the image.
protected float rotationRadians
return float

scaleToFitLineWhenOverflow protected_oe property

protected bool scaleToFitLineWhenOverflow
return bool

scaledHeight protected_oe property

This is the original height of the image taking rotation into account.
protected float scaledHeight
return float

scaledWidth protected_oe property

This is the scaled width of the image taking rotation into account.
protected float scaledWidth
return float

spacingAfter protected_oe property

protected float spacingAfter
return float

spacingBefore protected_oe property

protected float spacingBefore
return float

template protected_oe property

The template to be treated as an image.
protected PdfTemplate[],iTextSharp.text.pdf template
return iTextSharp.text.pdf.PdfTemplate[]

transparency protected_oe property

this is the transparency information of the raw image
protected int[] transparency
return int[]

type protected_oe property

The imagetype.
protected int type
return int

url protected_oe property

The URL of the image.
protected Uri,System url
return System.Uri