Results 1 to 3 of 3

Thread: image quality needs improvement

  1. #1
    Member
    Join Date
    Apr 06
    Posts
    48

    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"?

  2. #2
    Fanatic Member x-ice's Avatar
    Join Date
    Mar 04
    Location
    UK
    Posts
    671

    Re: image quality needs improvement


  3. #3
    Member
    Join Date
    Apr 06
    Posts
    48

    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
  •