Quantcast
Channel: WriteableBitmapEx
Viewing all articles
Browse latest Browse all 360

Created Unassigned: WPF WriteableBitmapExtensions.Resize incorrect alpha value in the final picture [21828]

$
0
0
For source bitmap with alpha channel ```WriteableBitmapExtensions.Resize(BitmapContext srcContext, int widthSource, int heightSource, int width, int height, Interpolation interpolation)``` returns incorrect alpha values in the result bitmap.

This method uses ```WriteableBitmapExtensions.Resize(BitmapContext srcContext, int widthSource, int heightSource, int width, int height, Interpolation interpolation)``` to resize bitmap.

```WriteableBitmapExtensions.Resize(BitmapContext srcContext, int widthSource, int heightSource, int width, int height, Interpolation interpolation)``` returns bitmap in *bgra32* pixel-format.

Then ```WriteableBitmapExtensions.Resize(this WriteableBitmap bmp, int width, int height, Interpolation interpolation)``` method uses BitmapFactory.New(width, height) to create result bitmap.
```C#
var result = BitmapFactory.New(width, height);
```
```BitmapFactory.New(width, height)``` creates *pbgra32* bitmap.
Incorrect alpha value in in the final picture as result.

Viewing all articles
Browse latest Browse all 360

Trending Articles



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