Windows 的Bitmap 含有三種容易混淆的格式 (PixelFormat)
Rgb: b-g-r (low memory address to high)
Argb: b-g-r-a
PArgb: pb-pg-pr-a
a=a/255f;
pb= a*b;
pg= a*g;
pr= a*r;
據說 PArgb 的Bitmap 畫起來比 Argb 快.
[ref]
http://www.codeproject.com/Tips/66909/Rendering-fast-with-GDI-What-to-do-and-what-not-to?display=Print
http://en.wikipedia.org/wiki/Premultiplied_alpha
沒有留言:
張貼留言