def createLayer(self, img, layerConfig, prevLayer, prevLayerConfig):
        targetImg = self.createTargetImage(img, layerConfig)
        diff = None

        parameters = []
        if prevLayer:
            # Place prev layer on current layer's canvas
            parameters = self.projectPrevLayerParametersToCurrent(prevLayerConfig, layerConfig)
            referenceImg = projectPrevLayerToCurrent(prevLayer, *parameters)

            # Create a diff image
            diff = diffImage(targetImg, referenceImg)

        return targetImg, parameters, diff
    def createLayer(self, img, layerConfig, prevLayer, prevLayerConfig):
        targetImg = self.createTargetImage(img, layerConfig)
        diff = None

        parameters = []
        if prevLayer:
            # Place prev layer on current layer's canvas
            parameters = self.projectPrevLayerParametersToCurrent(
                prevLayerConfig, layerConfig)
            referenceImg = projectPrevLayerToCurrent(prevLayer, *parameters)

            # Create a diff image
            diff = diffImage(targetImg, referenceImg)

        return targetImg, parameters, diff
 def rebuildImage(self, prevLayer, currLayer, parameters):
     base = projectPrevLayerToCurrent(prevLayer, *parameters)
     return undiffImage(currLayer, base)
Exemple #4
0
 def rebuildImage(self, prevLayer, currLayer, parameters):
     base = projectPrevLayerToCurrent(prevLayer, *parameters)
     return undiffImage(currLayer, base)