We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to read image byte while rendering chart?

Platform: UWP |
Control: SfChart |
Published Date: March 4, 2016 |
Last Revised Date: March 14, 2018 |
.NET Framework: 4.5 |
Product Version: 12.1.0.43
Tags: byte, image, reading

Reading a chart as a Stream of byte, and save it in image format while rendering can be  achieved by using the following codes. An FileStream supports both read and write operations. In this example, the chart is read as a Stream of bytes and saved  as an image. The RenderTargetBitmap class specifies the target chart width, height, and pixel of image in pixel format. The PngBitmapEncoder encodes the image to PNG Format. After the chart has been renderd, if we click the button, the chart image will be generated in the bin > debug folder.

C#

                                                     

 

 

 

 

 

 

 

 

 

 

C:\Users\mageshkumar\Pictures\Q25.png

2X faster development

The ultimate UWP UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon