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

Closed Issue: GetPixel Bug? [14151]

$
0
0
I think I found a bug in GetPixel, there are some casts missing for retrieving the colour components. You should be able to reproduce the issue by looping over the pixels and doing bmp.SetPixel(x,y,bmp.GetPixel(x,y))
 
WriteableBitmapBaseExtensions.cs Line 170
return Color.FromArgb(a, (byte)((c >> 16) * ai), (byte)((c >> 8)* ai), (byte)(c * ai));
Fix:
return Color.FromArgb(a, (byte)((byte)(c >> 16) * ai), (byte)((byte)(c >> 8)* ai), (byte)((byte)c * ai));
 
I did try to create and upload a patch but for some reason the mime type of the file was jpeg, I don't know if that is because my TortoiseSVN is slightly out of date or if the problem lies elsewhere.

Viewing all articles
Browse latest Browse all 360

Trending Articles



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