コード例 #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
コード例 #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
コード例 #3
0
 def thumbnail(self, width=None, height=None, frame=None, indexF=None):
     return imagemagick.make_thumbnail(self.path(), width, height)
コード例 #4
0
 def thumbnail(self, width=None, height=None, frame=None, indexF=None):
     return imagemagick.make_thumbnail(self.path(), width, height)