CtrlLib, Draw: New UHD scaler, fixed FileSel::SelectDir layout

git-svn-id: svn://ultimatepp.org/upp/trunk@8817 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-08-18 17:56:00 +00:00
parent bb71d2bbd4
commit fa23beeb40
6 changed files with 117 additions and 24 deletions

View file

@ -185,11 +185,11 @@ Image RecreateAlpha(const Image& overwhite, const Image& overblack)
RGBA *t = r;
RGBA *e = t + r.GetLength();
while(t < e) {
t->a = bs->r - ws->r + 255;
t->a = Saturate255(bs->r - ws->r + 255);
if(t->a) {
t->r = bs->r * 255 / t->a;
t->g = bs->g * 255 / t->a;
t->b = bs->b * 255 / t->a;
t->r = Saturate255(bs->r * 255 / t->a);
t->g = Saturate255(bs->g * 255 / t->a);
t->b = Saturate255(bs->b * 255 / t->a);
}
else
t->r = t->g = t->b = 0;