diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-11-08 15:00:58 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-11-08 15:00:58 +0000 |
| commit | 3b932abd0c7634483911e1d5361e12b2d094ae6f (patch) | |
| tree | d187652362c0d056222a03538a4812282cda7896 /src/lib/image.cc | |
| parent | 7ddba2932f3e577ecde3324a2094037252bdde18 (diff) | |
Add appearance dialog for SubRip subtitles.
Diffstat (limited to 'src/lib/image.cc')
| -rw-r--r-- | src/lib/image.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc index ed029ca2d..6835d0c26 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -464,10 +464,10 @@ Image::alpha_blend (shared_ptr<const Image> other, Position<int> position) uint8_t* op = other->data()[0] + oy * other->stride()[0]; for (int tx = start_tx, ox = start_ox; tx < size().width && ox < other->size().width; ++tx, ++ox) { float const alpha = float (op[3]) / 255; - /* Blend high bytes */ - tp[1] = op[0] * alpha + tp[1] * (1 - alpha); + /* Blend high bytes; the RGBA in op appears to be BGRA */ + tp[1] = op[2] * alpha + tp[1] * (1 - alpha); tp[3] = op[1] * alpha + tp[3] * (1 - alpha); - tp[5] = op[2] * alpha + tp[5] * (1 - alpha); + tp[5] = op[0] * alpha + tp[5] * (1 - alpha); tp += this_bpp; op += other_bpp; |
