summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e5e38da)
raw | patch | inline | side by side (parent: e5e38da)
author | JucaBlues <JucaBlues@users.sourceforge.net> | |
Wed, 13 Feb 2008 16:34:27 +0000 (16:34 +0000) | ||
committer | JucaBlues <JucaBlues@users.sourceforge.net> | |
Wed, 13 Feb 2008 16:34:27 +0000 (16:34 +0000) |
pixbuffer was erroneously initialized in premultiplied alpha mode.
src/display/nr-filter-flood.cpp | patch | blob | history |
index 34ab8eaa0a201414f2f9741a8ca7e99ceca50be3..ef95b87e5fe2eb425a5fcacc234804dfc10f719f 100644 (file)
NRPixBlock *out = new NRPixBlock;
- nr_pixblock_setup_fast(out, in->mode,
+ nr_pixblock_setup_fast(out, NR_PIXBLOCK_MODE_R8G8B8A8N,
in->area.x0, in->area.y0, in->area.x1, in->area.y1,
true);
unsigned char *out_data = NR_PIXBLOCK_PX(out);
unsigned char r,g,b,a;
- r = (unsigned char) (color >> 24) % 256;
- g = (unsigned char) (color >> 16) % 256;
- b = (unsigned char) (color >> 8) % 256;
+ r = CLAMP_D_TO_U8((color >> 24) % 256);
+ g = CLAMP_D_TO_U8((color >> 16) % 256);
+ b = CLAMP_D_TO_U8((color >> 8) % 256);
a = CLAMP_D_TO_U8(opacity*255);
for(i=0; i < 4*in_h*in_w; i+=4){