]> git.parisson.com Git - timeside.git/commitdiff
add transparent background to waveform images
authoryomguy <yomguy@parisson.com>
Thu, 8 Jul 2010 16:08:39 +0000 (16:08 +0000)
committeryomguy <yomguy@parisson.com>
Thu, 8 Jul 2010 16:08:39 +0000 (16:08 +0000)
timeside/grapher/core.py

index a06c6a1e80a08e7e4b83f6cd0beb988798c9dea2..b5f122aa07d60477ff4df64dc6affd12afc6a2e2 100644 (file)
@@ -157,7 +157,7 @@ class WaveformImage(object):
         self.higher = 12000
         self.spectrum = Spectrum(self.fft_size, self.nframes, self.samplerate, self.lower, self.higher, numpy.hanning)
 
-        self.image = Image.new("RGB", (self.image_width, self.image_height), self.bg_color)
+        self.image = Image.new("RGBA", (self.image_width, self.image_height), self.bg_color)
         self.pixel = self.image.load()
         self.draw = ImageDraw.Draw(self.image)
         self.previous_x, self.previous_y = None, None