Page 1 of 1
How to change export image resolution?
Posted: Sat Apr 14, 2007 12:38 am
by sw
Hi,
Is it possible to customize resolution for exported images without modifying the original source code?
thanks,
sw
How to change export image resolution?
Posted: Sat Apr 14, 2007 1:50 am
by Vital
It depends from type of export.
Thank you.
How to change export image resolution?
Posted: Sat Apr 14, 2007 10:54 am
by sw
I would like to change the image resolution for jpeg ang png export. Could you please give some example code?
thanks,
sw
How to change export image resolution?
Posted: Sat Apr 14, 2007 12:47 pm
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.
How to change export image resolution?
Posted: Sun Apr 15, 2007 2:29 pm
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
How to change export image resolution?
Posted: Mon Apr 16, 2007 1:28 pm
by Vital
Yes, you are right.
Thank you.