From 0498b9f9e679a9fd1827052eabba242f502c29ca Mon Sep 17 00:00:00 2001 From: Sergio Costas Date: Mon, 15 Dec 2014 10:22:02 +0100 Subject: [PATCH] Fixed the subtitle color option: now it sets the values in the 0-255 range, as expected --- src/devede/subtitles_mux.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/devede/subtitles_mux.py b/src/devede/subtitles_mux.py index 25a4c44..e6b8561 100644 --- a/src/devede/subtitles_mux.py +++ b/src/devede/subtitles_mux.py @@ -58,8 +58,9 @@ class subtitles_mux(devede.executor.executor): out_xml.write(str(font_size)) if subt_upper: out_xml.write('" bottom-margin="50') - out_xml.write('" fill-color="#%02X%02X%02X"' % fill_color) - out_xml.write(' outline-color="#%02X%02X%02X"' % outline_color) + + out_xml.write('" fill-color="#%02X%02X%02X"' % tuple([fill_color[i] * 255 for i in range(len(fill_color))])) + out_xml.write(' outline-color="#%02X%02X%02X"' % tuple([outline_color[i] * 255 for i in range(len(outline_color))])) out_xml.write(' outline-thickness="%d"' % outline_thick) out_xml.write(' font="arial" horizontal-alignment="center" vertical-alignment="bottom" aspect="') out_xml.write(str(aspect))