.net - C# Resized images have black borders -
I have problems with image scaling in .NET. I use the standard graphics type to resize images like this example:
Public static image scale (Image source image, int specific, int die heath) {bitmap tueran = new Bitmap (source image, destvuth, dead high); ToReturn.SetResolution (Source Image. HorizontalResolution, Source Image. Vertical Ringtones); (Graphics Graphics = Graphics Frameworks (ToReturn)) (Graphics CompositingQuality = System Drawings Drawing 2D Compositing Properties High Quality Graphics ShoeingMode System Drawing Drawing 2D Softking Mode High Quality ; Graphics Interpolation mode = Interpolation mode.Hyquive bibbic; Graphics Draw image (Source image, 0, 0, Distribute, Dest Hei );} Return to return;}
But I have a big problem with the pictures resized: They have brown and black borders and without them the images are extremely It is necessary.
Why do they appear and what can I do to make them disappear?
Sample output:
Try:
graphic.CompositingMode = CompositingMode.SourceCo Py;
Comments
Post a Comment