def makeCommand(self): dict = CommandMaker.getParamDict(self) self.width = dict['width'] self.height = dict['height'] self.angle = dict['angle'] self.borderColor = dict['borderColor'] self.borderWidth = dict['borderWidth'] self.borderHeight = dict['borderHeight'] self.cropWidth = dict['cropWidth'] self.cropHeight = dict['cropHeight'] self.cropX = dict['cropX'] self.cropY = dict['cropY'] self.imageMagickCommand = dict['imageMagickCommand'] if self.imageMagickCommand.strip() != '': toSplit = self.imageMagickCommand self.command = toSplit.split("%src")[0]+self.srcPath+toSplit.split("%src")[1].split("%dest")[0]+self.destPath else: self.command = "convert \"" +self.srcPath+ "\"" self.resize = self.getResizeString() self.rotate = self.getRotationString() self.crop = self.getCropString() self.border = self.getBorderString() self.command += self.crop + self.resize + self.rotate + self.border + " \""+self.destPath+ "\""
def __init__(self, srcPath, destPath, paramDictionary): CommandMaker.__init__(self, srcPath, destPath, paramDictionary) self.srcPath = srcPath self.destPath = destPath