Image

Overview

Image is a class in Aspose.PDF FOSS for .NET. Inherits from: BaseParagraph.

An image paragraph: a picture loaded from a file, a URL or a stream and laid out in the page flow (or at a fixed rectangle) when the document is built.

This class declares 4 methods for Image objects in .NET programs. Available methods include: BaseParagraph, Clone, GetMimeType, Image. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: BackgroundColor, BitmapInfo, BitmapSize, Border, File, FileType, and 22 more.

Properties

NameTypeAccessDescription
MarginMarginInfoRead/WriteOuter margins.
ImageStreamStreamRead/WriteGets or sets a stream holding the image data.
FilestringRead/WriteGets or sets the path of the image file, or an http(s) URL that is downloaded when the page is built.
FixWidthdoubleRead/WriteGets or sets the drawn width in points.
FixHeightdoubleRead/WriteGets or sets the drawn height in points.
ImageScaledoubleRead/WriteGets or sets the image scale.
IsBlackWhiteboolRead/WriteGets or sets the is black white.
IsApplyResolutionboolRead/WriteGets or sets whether the image’s embedded DPI sets its natural size.
BackgroundColorColorRead/WriteA colour painted under the image’s box before it is drawn – the box being the image and its Border bands.
BorderBorderInfoRead/WriteRules drawn around the image, outside it: each side’s band widens the box the image occupies, the way a bordered paragraph’s do.
FixedRectangleRectangleRead/WriteWhere the picture is drawn, in page space, when the CALLER places it: the flow draws it there on the page it has reached when the image’s turn comes, and moves nothing – the paragraph after it lands where it would have without it.
FixBoxIsExactboolRead/WriteWhether a Fix box is the picture’s size whatever the content band: one wider or taller than the band keeps it and runs off the page’s edge instead of being brought down to the band.
FitToBandWidthboolRead/WriteWhether an image with no fixed size is scaled, its aspect kept, to the WIDTH of the content band, whatever its height then is – up as well as down.
FitToRemainingAreaboolRead/WriteWhether an image with no fixed size is scaled, its aspect kept, to fill the width of the content band or the height still free on the page below the cursor – whichever binds first – growing as well as shrinking.
TitleAspose.Pdf.Text.TextFragmentRead/WriteGets or sets a caption for the image.
BitmapSizeAspose.Pdf.RectangleReadPixel dimensions of the source image as a rectangle [0, 0, width, height], decoded from ImageStream or File.
ImageFilterTypeImageFilterTypeRead/WriteGets or sets the compression filter to use for the embedded image.
BitmapInfoBitmapInfoRead/WriteOptional in-memory pixel buffer (public-API compatibility).
FileTypeImageFileTypeRead/WriteSource file format hint.
HorizontalAlignmentHorizontalAlignmentRead/WriteHorizontal alignment applied to this paragraph.
VerticalAlignmentVerticalAlignmentRead/WriteVertical alignment applied to this paragraph.
IsFirstParagraphInColumnboolRead/WriteForce the paragraph to start a new column.
IsKeptWithNextboolRead/WriteKeep this paragraph on the same page as the next one.
IsInNewPageboolRead/WriteForce the paragraph to start on a new page.
IsInLineParagraphboolRead/WriteInline paragraph flag (does not start a new line).
HyperlinkTextstring?Read/WriteLegacy string-typed hyperlink target.
HyperlinkHyperlink?Read/WriteTyped hyperlink decoration applied to the paragraph.
ZIndexintRead/WriteZ-order index used by the DOM renderer.

Methods

SignatureDescription
Image()Creates an image paragraph with no source; set File or ImageStream before the page is built.
Clone()Calls Clone on this Image instance.
GetMimeType(i: System.Drawing.Image)Best-effort MIME type for a System.Drawing.Image; returns “application/octet-stream” when the type cannot be determined.
BaseParagraph()Creates a paragraph with default alignment, an empty margin and no hyperlink.

See Also

 English