views:

27

answers:

1

I am trying to Draw an Image (JPG, TIFF, PNG) on the background of my user control. My user control will highlight certain portions of the Image using Rectangles. If I draw the image unscaled they are looking correct. But when I draw then Scaled [Fit to Page] then the image is not looking correct. For PNG some times it fails to load the image even.

The application is not a image processing app but I still want to show the Image scaled and can see the image properly.

Thanks --HAN

A: 

Before Drawing int he paint event I have added the following

        e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; 

Then the images looked alright.

Thanks for your comments.

--Hari

HAN