diff options
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) |
