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



resolutions
An array of Leadtools.LeadSize structures indicating the resolutions to save.
resolutions
An array of Leadtools.LeadSize structures indicating the resolutions to save.
Sets the resolutions to save when saving multi-resolution files.

Syntax

Visual Basic (Declaration) 
Public Sub SetResolutions( _
   ByVal resolutions() As LeadSize _
) 
Visual Basic (Usage)Copy Code
Dim instance As CodecsSaveOptions
Dim resolutions() As LeadSize
 
instance.SetResolutions(resolutions)
C# 
public void SetResolutions( 
   LeadSize[] resolutions
)
C++/CLI 
public:
void SetResolutions( 
   array<LeadSize>^ resolutions
) 

Parameters

resolutions
An array of Leadtools.LeadSize structures indicating the resolutions to save.

Example

For an example, refer to CodecsOptions.

Remarks

Currently, this only works with the JBIG format.

For JBIG, the maximum number of resolutions that can be saved is 29.

For a JBIG file, the values of different resolutions are implied because the dimensions of each resolution layer are half the dimensions of the one directly above it.

GetResolutions and SetResolutions are used to determine the highest resolution layer which will be saved in a file. You can fill the array with an actual width and height, or you can fill either the width or height with a valid value, and specify 0 for the other dimension to allow Leadtools to calculate that dimension based on the image's aspect ratio during the next save operation. Note that for JBIG, all the values set in the array are stored, but only the first item is used during an actual file save process.

Ex.

              uCount = 3
              Resolution[0].Width = 800
              Resolution[0].Height = 0
            

If you then save an image that is 1600 x 1200, the resolutions that are stored in the file would be:

               800 x 600
               400 x 300
               200 x 150
            

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