Print Page | Close Window

memory cost too much when displaying image

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4513
Printed Date: 05 May 2025 at 3:31am


Topic: memory cost too much when displaying image
Posted By: Todane
Subject: memory cost too much when displaying image
Date Posted: 11 Oct 2008 at 1:37pm
Hi,

When I display some images in a report with my program, it costs too much memory. The image file is small like 2MB, and even after it's read into the memory to create the object of ReportDocument, not much memory is used, but after the image is shown in the report, about 100MB memory is used.

This problem always causes "Out of memory" exception for my program when a lot of reports with a lot of images are open.

Any ideas? Thanks a lot!



Replies:
Posted By: BrianBischof
Date Posted: 13 Oct 2008 at 11:56am

A 2MB image is actually quite big for Crystal Reports. I had a similar problem and I loaded the image into Photoshop (or whatever program you want) and saved it as a smaller file. Since CR doesn't print high quality graphics, the report looked the same even though the image resolution was reduced.



-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window