Skip to content

TallComponents.UnoPdf.Client

TallComponents.UnoPdf.Client.Models.Pdf.Shapes

ImageShapeModel Class

A shape containing bitmap image.

csharp
public class ImageShapeModel : TallComponents.UnoPdf.Client.Models.Pdf.Shapes.ShapeModel

Inheritance System.Object 🡒 ShapeModel 🡒 ImageShapeModel

Remarks

In XML you can specifiy the image data as Base64 encoded data.
<example>
You can convert an image file to Base64 using the .NET method <see cref="M:System.Convert.ToBase64String(System.Byte[])"/>.
<para>C#</para><code>
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 );
}
</code></example>

Properties
CompressionThe compression to apply to the image data.
FrameCountThe number of frames in the image.
FrameIndexThe FrameIndex which will be used to get the actual image data from the Bitmap
HeightThe height of the image.
HorizontalResolutionGet the horizontal resolution, in pixels per inch, of this image.
HorizontalSizeGet the horizontal size (width) in pixels of this image.
IgnoreAlphaSet to true to completely ignore alpha transparency in the image. If no alpha information
is available this setting is ignored.
Default value is false.
InvertCmykChannelsSet to true to invert the colors in a CMYK image.
KeepAspectRatioIf 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.
MaskColorSet the color that will act as the transparent color.
PathRelative or absolute path of image file.
VerticalResolutionGet the vertical resolution, in pixels per inch, of this image.
VerticalSizeGet the vertical size (height) in pixels of this image.