/// <summary>/// Limits of image size options interface. /// </summary>publicinterfaceIMaxSizeOptions{/// <summary>/// Max width of an output image in pixels./// </summary>intMaxWidth{get;set;}/// <summary>/// Max height of an output image in pixels./// </summary>intMaxHeight{get;set;}}
Warning
If you set the ImageWidth/ImageHeight options, the ImageMaxWidth/ImageMaxHeight options are ignored.
To set the ImageMaxWidth/ImageMaxHeight options, follow these steps:
The following code snippet shows how to set the output image size limits:
using(Viewerviewer=newViewer("sample.jpg")){// Create a JPG or PNG file.JpgViewOptionsviewOptions=newJpgViewOptions("result_{0}.jpg");//PngViewOptions viewOptions = new PngViewOptions("result_{0}.png");// Specify the maximum width and height.viewOptions.MaxWidth=800;viewOptions.MaxHeight=600;viewer.View(viewOptions);}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.