diff options
| author | Pepper <pepper@scannerjammer.com> | 2015-02-26 18:47:25 -0500 |
|---|---|---|
| committer | Pepper <pepper@scannerjammer.com> | 2015-02-26 18:47:25 -0500 |
| commit | 296edc5ad772d0e31384246b566648f3b5b545e7 (patch) | |
| tree | d5cb61569274f5128bb0d2ce14e418d9fad4580a /imgrid.py | |
| parent | d644dc77b51cb82a95d4f81af20a28fe87abd6c1 (diff) | |
ok done!
Diffstat (limited to 'imgrid.py')
| -rwxr-xr-x | imgrid.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -15,7 +15,8 @@ urlopen = urllib2.urlopen Request = urllib2.Request MAX_SIZE = 1024 * 1024 * 1.2 * 1.5 -WORKING_DIR = "/tmp" +WORKING_DIR = "/var/www/cache" +#WORKING_DIR = "/tmp" BIN_CONVERT = "/usr/bin/convert" BIN_COMPOSITE = "/usr/bin/composite" @@ -170,6 +171,10 @@ class Imgrid(): raise; elif k in [ 'bgcolor', 'planebgcolor' ]: self.params[k] = params[k] + elif k == 'opacity': + self.params[k] = str(float(params[k])) + elif k == 'zoom': + self.params[k] = int(float(params[k])) else: self.params[k] = bool_correct(sanitize(params[k])) else: @@ -250,7 +255,8 @@ class Imgrid(): if self.params.swing: cmd += ["pan={}".format(self.params.swing)] if self.params.tilt: cmd += ["tilt={}".format(self.params.tilt)] if self.params.roll: cmd += ["roll={}".format(self.params.roll)] - if self.params.zoom: cmd += ["zoom={}".format(self.params.zoom)] + if self.params.zoom: + cmd += ["zoom={}".format(self.params.zoom)] if cmd == [THREEDROTATE]: #if nothing has been added return if self.params.planebgcolor and not self.params.planebgimage: @@ -258,7 +264,7 @@ class Imgrid(): else: cmd += ["bgcolor=none"] cmd += ["skycolor={}".format(self.params.skycolor or 'none')] - if self.params.transition: cmd += ["vp={}",self.params.transition] + if self.params.transition: cmd += ["vp={}".format(self.params.transition)] cmd += [ self.filepath, self.filepath ] self._call_cmd(cmd) |
