'Start the animation. You must have called :meth:`initialize` first.
:param duration: Animation duration in seconds.'

def __call__(self, image, duration=0.5):

    if self.running:
        return
    self.after_image = QPixmap.fromImage(image)
    if self.flip_forwards:
        self.animation.setStartValue(image.width())
        self.animation.setEndValue(0)
        t = self.before_image
        self.before_image = self.after_image
        self.after_image = t
        self.animation.setEasingCurve(QEasingCurve(QEasingCurve.InExpo))
    else:
        self.animation.setStartValue(0)
        self.animation.setEndValue(image.width())
        self.animation.setEasingCurve(QEasingCurve(QEasingCurve.OutExpo))
    self.animation.setDuration((duration * 1000))
    self.animation.start()
