]> git.parisson.com Git - timeside.git/commitdiff
Merge branch 'parameters_with_traits' into diadems
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 15 Jul 2014 08:50:37 +0000 (10:50 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 15 Jul 2014 08:50:37 +0000 (10:50 +0200)
Conflicts:
setup.py
timeside/grapher/render_analyzers.py
timeside/server/models.py

1  2 
setup.py
timeside/analyzer/core.py
timeside/grapher/render_analyzers.py

diff --cc setup.py
index 595f5393a7ca4fe70a30790f19d09a9c1182c950,1077787360c644bf0d14eebb5d3375fb6e447312..12b2fc41b3c234eaedc7122699fb9b54430efea8
+++ b/setup.py
@@@ -58,9 -58,8 +58,10 @@@ setup
          'django-extensions',
          'djangorestframework',
          'south',
 -        'traits'
 +        'py_sonicvisualiser',
++        'traits',
          ],
 +
    platforms=['OS Independent'],
    license='Gnu Public License V2',
    classifiers = CLASSIFIERS,
Simple merge
index 3ba9414dfad2b0faa506b379b341e7cdd801ed7e,f9762071065cba36332355aded290c7c2e0f79a3..79539f3f809e1ccb3f3e893d0b161ed2c4f9714c
@@@ -53,27 -53,14 +53,27 @@@ class DisplayAnalyzer(Grapher)
  
      @interfacedoc
      def post_process(self):
-         parent_result = self.process_pipe.results[self._result_id]
+         pipe_result = self.process_pipe.results
+         parent_result = pipe_result.get_result_by_id(self._result_id)
  
 -        self.image = parent_result._render_PIL((self.image_width,
 -                                                self.image_height), self.dpi)
 +        fg_image = parent_result._render_PIL((self.image_width,
 +                                              self.image_height), self.dpi)
 +        if self._background:
 +            bg_result = self.process_pipe.results[self._bg_id]
 +            bg_image = bg_result._render_PIL((self.image_width,
 +                                              self.image_height), self.dpi)
 +            # convert image to grayscale
 +            bg_image = bg_image.convert('LA').convert('RGBA')
 +
 +            # Merge background and foreground images
 +            from PIL.Image import blend
 +            fg_image = blend(fg_image, bg_image, 0.25)
 +
 +        self.image = fg_image
  
      @classmethod
 -    def create(cls, analyzer, result_id, grapher_id, grapher_name):
 +    def create(cls, analyzer, result_id, grapher_id, grapher_name,
 +               background=None):
  
          class NewGrapher(cls):