This is a migrated thread and some comments may be shown as answers.

ExportToImage returnImageSize & dpi parameters

1 Answer 49 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
Iron
David asked on 31 Jul 2015, 10:04 PM

Say I have a Diagram that is 1920x1080.  I call ExportToImage with an enclosingBounds of (0, 0, 1920, 1080), a returnImageSize of (1920,1080), and a dpi of 384.

 I get an image that is 7680 x 4320.  Is that expected?  I am (perhaps naively) expecting to get an image that is 1920x1080, based on the value of the returnImageSize parameter.

 Thanks!

-David

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Kiril Vandov
Telerik team
answered on 03 Aug 2015, 02:18 PM
Hello David,

The size of the Image that will be generated is based on two factors the ReturnImageSize and the DPI. If you are using the default DPI of 96 the Image will be saved in the format just like you expect. However once you change the DPI you are trying to save the image in bigger details. We internally scale the retrunImageSize based on a DPI factor (dpiScale = dpi / 96.0) and there for the image size is changed in order to save the image in the desired quality.

I hope this information helps.

Kind regards,
Kiril Vandov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Diagram
Asked by
David
Top achievements
Rank 1
Iron
Answers by
Kiril Vandov
Telerik team
Share this question
or