doable in .net?
-
Have a canvas 700 x 500. Want to paste an image on it . My image can be smaller or bigger than the Canvas. Smaller image fits fine on the canvas... But if I have an image larger than the canvas...how can I resize it without blurring the image?? I believe photoshop can reduce image size without blurring/squeshing the image..so, it reduces the image without messing it up... Is this doable in .Net? Ca i resize/reduce an image to fit a 700x500 canvas without messing up how the image looks?? any ideas/sample code/website would be great to get me going...
-
Have a canvas 700 x 500. Want to paste an image on it . My image can be smaller or bigger than the Canvas. Smaller image fits fine on the canvas... But if I have an image larger than the canvas...how can I resize it without blurring the image?? I believe photoshop can reduce image size without blurring/squeshing the image..so, it reduces the image without messing it up... Is this doable in .Net? Ca i resize/reduce an image to fit a 700x500 canvas without messing up how the image looks?? any ideas/sample code/website would be great to get me going...
I think all you need to do is set the InterpolationMode to Bicubic instead of Default. Example: e.Graphics.InterpolationMode = Drawing.Drawing2D.InterpolationMode.Bicubic e.Graphics.DrawImage(bmpImage, destRect, srcRect, GraphicsUnit.Pixel) Look up InterpolationMode in the help for all of the different modes. To not know is bad. To not wish to know is worse.
-
I think all you need to do is set the InterpolationMode to Bicubic instead of Default. Example: e.Graphics.InterpolationMode = Drawing.Drawing2D.InterpolationMode.Bicubic e.Graphics.DrawImage(bmpImage, destRect, srcRect, GraphicsUnit.Pixel) Look up InterpolationMode in the help for all of the different modes. To not know is bad. To not wish to know is worse.