Example #1
0
 def cut_last_frame(self, file_name, scroll):
     pixels = self.__calculate_fixed_top()
     not_fixed = self.__calculate_not_fixed_area()
     img = Cropper.image(file_name)
     cuts = pixels + (not_fixed - scroll)
     img2 = Cropper.crop_top(img, self.convert_size_ratio(cuts))
     img2.save(file_name)
Example #2
0
 def cut_last_frame(self, file_name, scroll):
     borders = self.window.get_fixed_border()
     pixels = borders["top"]
     not_fixed = self.window.page_height() - (borders["top"] +
                                              borders["bottom"])
     img = Cropper.image(file_name)
     cuts = pixels + (not_fixed - scroll)
     img2 = Cropper.crop_top(img, self.convert_size_ratio(cuts))
     img2.save(file_name)
Example #3
0
 def cut_bottom(self, file_name):
     pixels = self.__calculate_fixed_bottom()
     img = Cropper.image(file_name)
     img2 = Cropper.crop_bottom(img, self.convert_size_ratio(pixels))
     img2.save(file_name)
Example #4
0
 def clean_screenshot(self, image_path):
     image = Cropper.image(image_path)
     crops = self.window.get_crops()
     image = Cropper.crop(image, crops["x"], crops["y"], crops["width"],
                          crops["height"])
     Cropper.save(image, image_path)
Example #5
0
 def cut_bottom(self, file_name):
     borders = self.window.get_fixed_border()
     pixels = borders["bottom"]
     img = Cropper.image(file_name)
     img2 = Cropper.crop_bottom(img, self.convert_size_ratio(pixels))
     img2.save(file_name)