mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-27 22:03:43 -06:00
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:
parent
bb71d2bbd4
commit
fa23beeb40
6 changed files with 117 additions and 24 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue