Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-01-04 17:19:57 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-01-04 17:19:57 +0400
commit821d481f53b77a3b14ab8d1343dab7ae26f089c9 (patch)
tree06b269082b988dbfca849d0b288cfe6dfba4cfe2 /source/blender/blenkernel/intern/sequencer.c
parentec33cacc62054fb1ca90aa860e6b9866ca4a7126 (diff)
Correction for rev53555 which was obviously wrong -- always setting alpha to premul
Also optimized it a bit by skipping byte/float buffer allocation.
Diffstat (limited to 'source/blender/blenkernel/intern/sequencer.c')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 465b1bc4e29..8d010de408a 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -3962,16 +3962,16 @@ void BKE_sequence_init_colorspace(Sequence *seq)
/* initialize input color space */
if (seq->type == SEQ_TYPE_IMAGE) {
- ibuf = IMB_loadiffname(name, IB_rect, seq->strip->colorspace_settings.name);
+ ibuf = IMB_loadiffname(name, IB_test | IB_alphamode_detect, seq->strip->colorspace_settings.name);
/* byte images are default to straight alpha, however sequencer
* works in premul space, so mark strip to be premultiplied first
*/
- seq->alpha_mode = SEQ_ALPHA_PREMUL;
+ seq->alpha_mode = SEQ_ALPHA_STRAIGHT;
if (ibuf) {
- if (ibuf->rect_float) {
- seq->alpha_mode = SEQ_ALPHA_PREMUL;
- }
+ if (ibuf->flags & IB_alphamode_premul)
+ seq->alpha_mode = IMA_ALPHA_PREMUL;
+
IMB_freeImBuf(ibuf);
}
}