How to change export image resolution?

Stimulsoft Reports.NET discussion
Post Reply
sw
Posts: 22
Joined: Fri Jan 26, 2007 10:26 pm

How to change export image resolution?

Post by sw »

Hi,

Is it possible to customize resolution for exported images without modifying the original source code?

thanks,

sw
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

How to change export image resolution?

Post by Vital »

It depends from type of export.

Thank you.
sw
Posts: 22
Joined: Fri Jan 26, 2007 10:26 pm

How to change export image resolution?

Post by sw »

I would like to change the image resolution for jpeg ang png export. Could you please give some example code?

thanks,

sw
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

How to change export image resolution?

Post by Vital »

Please use following code:

Code: Select all

StiBmpExportSettings settings = new StiBmpExportSettings();
settings.ImageZoom = 2;

report.ExportDocument(StiExportFormat.ImageBmp, "1.bmp", settings);
If you want change image zoom in GUI you can use combo box "Zoom:".

For also you can change default value of combo box "Zoom:":

Code: Select all

StiSettings.Load();
StiSettings.Set("StiImageExportSetupForm", "Zoom", "200%");
StiSettings.Save();
Thank you.
sw
Posts: 22
Joined: Fri Jan 26, 2007 10:26 pm

How to change export image resolution?

Post by sw »

Hi, Vital,

Thank you for your suggestion. But your example code does not solve my problem.

By default, the exported Jpeg image on my machine is 96dpi, but I would like to set the exported image resolution to 200dpi or 600dpi. The ImageZoom factor only resize the generated image, but not the resolution.

A related question: I can use StiPage.GetThumbnail() to get the same result as using ImageZoom, right?

sw
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

How to change export image resolution?

Post by Vital »

Yes, you are right.

Thank you.
Post Reply