From: yomguy Date: Fri, 18 Jun 2010 20:09:33 +0000 (+0000) Subject: fix bad default scheme X-Git-Tag: 0.3.2~137 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=bcedd48cdc35b4aff4660ea614cc0429862cc456;p=timeside.git fix bad default scheme --- diff --git a/timeside/grapher/core.py b/timeside/grapher/core.py index b42e29f..21b8fe1 100644 --- a/timeside/grapher/core.py +++ b/timeside/grapher/core.py @@ -131,21 +131,22 @@ class WaveformImage(object): Adds pixels iteratively thanks to the adapter providing fixed size frame buffers. Peaks are colored relative to the spectral centroids of each frame packet. """ - def __init__(self, image_width, image_height, nframes, samplerate, fft_size, bg_color=(0,0,0), color_scheme='default', filename=None): + def __init__(self, image_width, image_height, nframes, samplerate, fft_size, bg_color=(0,0,0), color_scheme=None, filename=None): self.image_width = image_width self.image_height = image_height self.nframes = nframes self.samplerate = samplerate self.fft_size = fft_size self.filename = filename - self.bg_color = bg_color self.color_scheme = color_scheme if isinstance(color_scheme, dict): colors = color_scheme['waveform'] - else: + elif color_scheme: colors = default_color_schemes[self.color_scheme]['waveform'] + else: + colors = default_color_schemes['default']['waveform'] self.color_lookup = interpolate_colors(colors) diff --git a/timeside/grapher/waveform.py b/timeside/grapher/waveform.py index 982192c..fb7016e 100644 --- a/timeside/grapher/waveform.py +++ b/timeside/grapher/waveform.py @@ -34,11 +34,11 @@ class Waveform(Processor): if width: self.width = width else: - self.width = 1500 + self.width = 1024 if height: self.height = height else: - self.height = 200 + self.height = 256 self.bg_color = bg_color self.color_scheme = color_scheme self.filename = output