LEADTOOLS Image File Support (Leadtools.Codecs assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
YResolution Property
See Also 
Leadtools.Codecs Namespace > CodecsRasterizeDocumentLoadOptions Class : YResolution Property



Gets or sets the vertical resolution to use when rasterization document files.

Syntax

Visual Basic (Declaration) 
Public Property YResolution As Integer
Visual Basic (Usage)Copy Code
Dim instance As CodecsRasterizeDocumentLoadOptions
Dim value As Integer
 
instance.YResolution = value
 
value = instance.YResolution
C# 
public int YResolution {get; set;}
C++/CLI 
public:
property int YResolution {
   int get();
   void set (    int value);
}

Property Value

An System.Int32 value that indicates the vertical resolution to use when rasterization document files such as PDF and XPS. The default value is 0, which means use the current screen resolution.

Example

For an example, refer to CodecsRasterizeDocumentLoadOptions.

Remarks

The resolution controls the pixel density of the result raster image. For example, if you specify 8.5 by 11 inches page width and height and a resolution of 96, the result image will have a pixel width and height of (8.5 * 96 = 816) and (11 * 96 = 1056) pixels. This is suitable for viewing at a 100 percent zoom but when you start zooming in, the image will get pixelated. Pixelation may also occur if you send the raster image to a printer, since printers usually have much higher resolution than a screen.

If zooming in or high quality printing is a requirement in your code, then a higher resolution value must be specified, for example 300 by 300. For an 8.5 by 11 inch document, this results in a raster image size if (8.5 * 300 = 2550) and (11 * 300 = 3300) pixels. More than suitable for printing or zooming in. Keep in mind that increasing the resolution will increase the memory used to hold the image data. Finding the right balance between pixel density and memory consumption depends on your application needs.

After the Leadtools.RasterImage is loaded, the image resolution set in RasterImage.XResolution and RasterImage.YResolution will be the same as XResolution and YResolution.

The horizontal resolution is specified in XResolution. For most normal usage, the value of XResolution and YResolution should be equal.

If the value of CodecsRasterizeDocumentLoadOptions.Enabled is set to true, then XResolution and YResolution will be used instead of the following properties:

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also