Namespace TallComponents.PDF.Layout.Shapes
Class ImageShape
A shape containing bitmap image.
In XML, you can specify the image data as Base64 encoded data.
You can convert an image file to Base64 using the .NET method . C# string base64Data; using ( FileStream fs = new FileStream( fileName , FileMode.Open ) ) { byte[] bytes = new byte[ fs.Length ]; fs.Read( bytes, 0, bytes.Length ); base64Data = Convert.ToBase64String( bytes ); }
Syntax
public class ImageShape
: ContentShape
,
ISerializable
Constructors
ImageShape()
Creates a new ImageShape.
ImageShape(Stream)
Create a new ImageShape from a stream of binary data.
ImageShape(Stream,Int32,Boolean)
Create a new ImageShape from a stream of binary data.
ImageShape(SerializationInfo,StreamingContext)
ImageShape constructor for serialization purposes.
ImageShape(String)
Create a new image shape from a relative or virtual path.
ImageShape(String,Int32)
Create a new image shape from a relative, absolute or virtual path.
ImageShape(Bitmap)
Constructs an Image shape from a bitmap.
Properties
Compression Compression
The compression to apply to the image data.
Int32 FrameCount
The number of frames in the image.
Int32 FrameIndex
The FrameIndex which will be used to get the actual image data from the Bitmap
Double Height
The height of the image.
Double HorizontalResolution
Get the horizontal resolution, in pixels per inch, of this image.
Boolean IgnoreAlpha
Set to true to completely ignore alpha transparency in the image. If no alpha information
is available this setting is ignored.
Default value is false.
Boolean InvertCmykChannels
Set to true to invert the colors in a CMYK image.
Boolean KeepAspectRatio
If KeepAspectRatio is set to true, the height is calculated from the
width so that the width/height ratio is equal to the columns/rows ratio
of the raster of the original image. If set to false, the specified
width and height are used and the image will in general appear distorted.
Color MaskColor
Set the color that will act as the transparent color.
String Path
Relative or absolute path of image file.
Double VerticalResolution
Get the vertical resolution, in pixels per inch, of this image.
Double Width
The width of the image.
Methods
Int32 GetFrameCount(Stream)
Extract the number of frames from the image data.
Int32 GetFrameCount(String)
Extract the number of frames from the image data.
Int32 GetFrameCount(String,Object,GetWebCredentialsEventHandler)
Extract the number of frames from the image data.