GetImage Method
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. Core. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.Server. dll
Description
Gets a part of a document as an image.
Syntax
GetImage()
Gets an image as a System.Drawing.Imaging.Bitmap.
Only in TXTextControl.TextControl.ASP.SDK.
public Bitmap GetImage();Public Function GetImage() As BitmapGetImage(Rectangle)
Gets a clipping of the image as a System.Drawing.Imaging.Bitmap.
Only in TXTextControl.TextControl.ASP.SDK.
public Bitmap GetImage(Rectangle clipRectangle);Public Function GetImage(clipRectangle As Rectangle) As Bitmap| Parameter | Description |
|---|---|
| clipRectangle | Specifies the clipping, in pixels, relative to the top-left corner of the image, determined through the View.Location and View.Size properties. |
GetImage(out byte[])
Gets an image as an array of bytes in Portable Network Graphics (PNG) format.
Only in TXTextControl.TextControl.ASP.SDK.
public bool GetImage(out byte[] arImage);Public Function GetImage(ByRef arImage As Byte()) As Boolean| Parameter | Description |
|---|---|
| arImage | Specifies a byte array into which the data is saved. No memory needs to be allocated through the caller. |
GetImage(out byte[], Rectangle)
Gets a clipping of an image as an array of bytes in Portable Network Graphics (PNG) format.
Only in TXTextControl.TextControl.ASP.SDK.
public bool GetImage(out byte[] arImage, Rectangle clipRectangle);Public Function GetImage(ByRef arImage As Byte(), clipRectangle As Rectangle) As Boolean| Parameter | Description |
|---|---|
| arImage | Specifies a byte array into which the data is saved. No memory needs to be allocated through the caller. |
| clipRectangle | Specifies the clipping, in pixels, relative to the top-left corner of the image, determined through the View.Location and View.Size properties. |
GetImage(Rectangle, int, int, int)
Gets a clipping of an image as a string in Scalable Vector Graphics (.SVG) format. The clipping can be specified either through a rectangle or through a range of lines. All characters are contained with outline curve data that are cubic Bézier splines. Curve and line data coordinates are in twentieth of a point (twips). Images of all pixel-formats are embedded in Portable Network Graphics (PNG) format.
public string GetImage(Rectangle clipRectangle, int iFirstInvalidLine, int iLastInvalidLine, int iMaxImageResolution);Public Function GetImage(clipRectangle As Rectangle, iFirstInvalidLine As Integer, iLastInvalidLine As Integer, iMaxImageResolution As Integer) As String| Parameter | Description |
|---|---|
| clipRectangle | Specifies the clipping, in pixels, relative to the top-left corner of the image, determined through the View.Location and View.Size properties. |
| iFirstInvalidLine | Specifies the first of a range of lines, one-based, determining the returned image. If this parameter in 0, the clipRectangle determines the image. |
| iLastInvalidLine | Specifies the last of a range of lines, one-based, determining the returned image. If this parameter in 0, the clipRectangle determines the image. |
| iMaxImageResolution | Specifies a maximum resolution value, in dots per inch, for images in pixel-formats. All of these images are embedded in Portable Network Graphics (PNG) format. |
GetImage(Rectangle, Page.PageContent, int, int, int)
Only in TXTextControl.TextControl.ASP.SDK.
public Metafile GetImage(Rectangle clipRectangle, Page.PageContent content, int iFirstInvalidLine, int iLastInvalidLine, int iMaxImageResolution);Public Function GetImage(clipRectangle As Rectangle, content As Page.PageContent, iFirstInvalidLine As Integer, iLastInvalidLine As Integer, iMaxImageResolution As Integer) As MetafileExamples
The following example retrieves image from the view.
var result = view.GetImage(new System.Drawing.Rectangle(20, 20, 600, 400));
Console.WriteLine($"Get Image result: {result}");Dim result = view.GetImage(New System.Drawing.Rectangle(20, 20, 600, 400))
Console.WriteLine($"Get Image result: {result}")