Ejemplo n.º 1
0
    def thumbnail(self, width=None, height=None, frame=None, indexF=None):

        if indexF != None:
            percent = indexF

        elif frame != None:
            percent = frame / float(self.properties()["frames"])

        else:
            percent = 0.5

        image = ffmpeg.frame_grab_percent(self.path(), percent=percent, properties=self.properties())
        scaled_image = imagemagick.make_thumbnail(image, width=width, height=height, use_stdin=True)
        return scaled_image
Ejemplo n.º 2
0
    def thumbnail(self, width=None, height=None, frame=None, indexF=None):

        if indexF != None:
            percent = indexF

        elif frame != None:
            percent = frame / float(self.properties()['frames'])

        else:
            percent = .5

        image = ffmpeg.frame_grab_percent(self.path(),
                                          percent=percent,
                                          properties=self.properties())
        scaled_image = imagemagick.make_thumbnail(image,
                                                  width=width,
                                                  height=height,
                                                  use_stdin=True)
        return scaled_image
Ejemplo n.º 3
0
 def thumbnail(self, width=None, height=None, frame=None, indexF=None):
     return imagemagick.make_thumbnail(self.path(), width, height)
Ejemplo n.º 4
0
 def thumbnail(self, width=None, height=None, frame=None, indexF=None):
     return imagemagick.make_thumbnail(self.path(), width, height)