|
-
Aug 29th, 2012, 11:45 AM
#1
Thread Starter
Member
image quality needs improvement
Hello,
I have an image that I would like to make more "crisp".
The code (in C#) for producing the image looks like this:
Code:
Bitmap bitmap = new Bitmap(rectangle.Width, rectangle.Height, PixelFormat.Format24bppRgb);
Graphics graphics = Graphics.FromImage(bitmap);
graphics.Clear(Color.White);
BowTieController controller = new BowTieController(_session, loop, new PointF(1.0F, 1.0F));
controller.Draw(graphics, rectangle);
What a BowTieController is may or may not be important right now, but I'd like to focus first on how the Bitmap and Graphics objects are initialized, and if the problem turns out not to be there, we can then focus on the BowTieController and how it draws the image.
First, let me explain where the problem shows up. After the above code draws the image, it is then placed into a Picture control in ActiveReports. It is then exported to PDF. You really notice the poor quality of the image in PDF. Something like the resolution or anti-aliasing needs to be improved.
I tried things like the following to no avail:
bitmap.SetResolution(bitmap.HorizontalResolution * 2, bitmap.VerticalResolution * 2);
graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
Is there anything else I can try on the Bitmap or Graphics objects that might make the image appear more "crip"?
-
Aug 30th, 2012, 05:44 AM
#2
Fanatic Member
Re: image quality needs improvement
-
Aug 31st, 2012, 11:33 AM
#3
Thread Starter
Member
Re: image quality needs improvement
Thanks x-ice,
I found that adding this line solves half the problem:
PdfExport.ImageQuality = ImageQuality.Highest;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|