ExportToImage returnImageSize & dpi parameters

2 posts, 1 answers
  1. David
    David avatar
    25 posts
    Member since:
    Jan 2013

    Posted 31 Jul 2015 Link to this post

    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

     

  2. Answer
    Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 03 Aug 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top