image resolution in a report
image resolution in a report
Hello,
I am generating a report in which there could be hundreds of images with varying sizes and resolutions. On disk, the images could be as large as 3MB - or even larger.
The report is a master detail report listing work orders and associated images. For each work order, there could be 0 or more images related to that work order.
I know there are compression options when exporting a report, but is there a way to reduce the size or resolution of an image when previewing or creating a report?
Perhaps using the GetImageData event and an expression similar to (sender as StiImage).Resolution = 100 ?
I am using Stimulsoft Report.Web with Flash Player 26.
Thanks,
Carl
I am generating a report in which there could be hundreds of images with varying sizes and resolutions. On disk, the images could be as large as 3MB - or even larger.
The report is a master detail report listing work orders and associated images. For each work order, there could be 0 or more images related to that work order.
I know there are compression options when exporting a report, but is there a way to reduce the size or resolution of an image when previewing or creating a report?
Perhaps using the GetImageData event and an expression similar to (sender as StiImage).Resolution = 100 ?
I am using Stimulsoft Report.Web with Flash Player 26.
Thanks,
Carl
Re: image resolution in a report
Hello Carl,
There are two ways:
- check and decrease size in the GetImageData event or
- use two version of images - original and min size.
Thank you.
There are two ways:
- check and decrease size in the GetImageData event or
- use two version of images - original and min size.
Thank you.
Re: image resolution in a report
Thanks for the suggestions Aleksey.
Is the proper syntax for decreasing the image size in the GetImageData event the following...
(sender as StiImage).Resolution = 100 (or whatever number I need)?
If I use that expression, I get the following error when trying to preview the report.
'Stimulsoft.Report.Components.StiImage' does not contain a definition for 'Resolution' and no extension method 'Resolution' accepting a first argument of type 'Stimulsoft.Report.Components.StiImage' could be found (are you missing a using directive or an assembly reference?)
What expression should I use for checking the image resolution?
Carl
Is the proper syntax for decreasing the image size in the GetImageData event the following...
(sender as StiImage).Resolution = 100 (or whatever number I need)?
If I use that expression, I get the following error when trying to preview the report.
'Stimulsoft.Report.Components.StiImage' does not contain a definition for 'Resolution' and no extension method 'Resolution' accepting a first argument of type 'Stimulsoft.Report.Components.StiImage' could be found (are you missing a using directive or an assembly reference?)
What expression should I use for checking the image resolution?
Carl
Re: image resolution in a report
Hello, Carl.
There is no our methods that will help you.
But the good news is that we are using the .Net Framework.
You could add there any C# or VB.NET code (depending on selected language) to decrease a size of the images.
I think you could find many solutions for your task on the Internet.
Thank you.
There is no our methods that will help you.
But the good news is that we are using the .Net Framework.
You could add there any C# or VB.NET code (depending on selected language) to decrease a size of the images.
I think you could find many solutions for your task on the Internet.
Thank you.
Re: image resolution in a report
OK- Thank You. I will search the internet to see what I can come up with.
Re: image resolution in a report
Hello
Please let us know if you need any additional help.
Thank you.
Please let us know if you need any additional help.
Thank you.
Re: image resolution in a report
Hi,
I'm still trying to figure out how to reduce the size/resolution of images that get displayed in the report. I've tried
each of the code snippets below in the GetImageData event of the Image control, but neither seem to do anything.
Perhaps I need to somehow apply the bmp_new to the Image control, but I don't really know how to do that. Would
someone be able to point me in the right direction?
Thanks,
Carl
Bitmap bmp_new = (Bitmap)(sender as Image);
bmp_new.SetResolution(20,20);
Bitmap bmp = (Bitmap)(sender as Image);
Bitmap bmp_new = new Bitmap(bmp, new Size(bmp.Width/8,bmp.Height/8));
I'm still trying to figure out how to reduce the size/resolution of images that get displayed in the report. I've tried
each of the code snippets below in the GetImageData event of the Image control, but neither seem to do anything.
Perhaps I need to somehow apply the bmp_new to the Image control, but I don't really know how to do that. Would
someone be able to point me in the right direction?
Thanks,
Carl
Bitmap bmp_new = (Bitmap)(sender as Image);
bmp_new.SetResolution(20,20);
Bitmap bmp = (Bitmap)(sender as Image);
Bitmap bmp_new = new Bitmap(bmp, new Size(bmp.Width/8,bmp.Height/8));
Re: image resolution in a report
Hello, Carl.
You don't need to apply this. This is already the necessary image.
Do you get the necessary result or not?
Thank you.
You don't need to apply this. This is already the necessary image.
Do you get the necessary result or not?
Thank you.