More fixes:

* Fill brush did not do proper srgb conversion for byte images (reported
by Sebastian Koenig, thanks!)
* Color sampling for palettes did not refresh the toolbar.
This commit is contained in:
Antonis Ryakiotakis 2014-10-17 14:25:50 +02:00 committed by Campbell Barton
parent 10b16ae2bc
commit 2be96c0110
3 changed files with 3 additions and 0 deletions

View File

@ -1309,6 +1309,7 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
data->sample_palette = true;
sample_color_update_header(data, C);
}
WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush);
}
break;
}

View File

@ -1619,6 +1619,7 @@ void paint_2d_gradient_fill(
}
do_colorband(br->gradient, f, color_f);
linearrgb_to_srgb_v3_v3(color_f, color_f);
rgba_float_to_uchar((unsigned char *)&color_b, color_f);
((unsigned char *)&color_b)[3] *= br->alpha;
IMB_blend_color_byte((unsigned char *)(ibuf->rect + y_px * ibuf->x + x_px),

View File

@ -4104,6 +4104,7 @@ static void *do_projectpaint_thread(void *ph_v)
color_f, ps->blend);
}
else {
linearrgb_to_srgb_v3_v3(color_f, color_f);
rgba_float_to_uchar(projPixel->newColor.ch, color_f);
IMB_blend_color_byte(projPixel->pixel.ch_pt, projPixel->origColor.ch_pt,
projPixel->newColor.ch, ps->blend);