Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

Created Unassigned: WebImage.Resize can sometimes add black border [1126]

$
0
0
Sometimes resizing an image can add a black border to the output, example (images attached):
```
new WebImage("original.jpg").Resize(180, 180).Save("output.jpg");
```
A possible fix is in System.Web.Helpers/WebImage.cs:
```
private static Bitmap GetBitmapFromImage(Image image, int width, int height, bool preserveResolution = true)
{
....
+ bitmap.MakeTransparent();
```

Viewing all articles
Browse latest Browse all 7925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>