Utils

Updated at:

concat_vertical_scrolling_screenshots

concat_vertical_scrolling_screenshots(screenshot_list, save_path, *, top_edge=None, bottom_edge=None)

Method description

Concatenates screenshots into a long image that supports vertical scrolling.

Parameter description

screenshot_list: the screenshots to be concatenated. Up to five screenshots are supported. The value must be a list of strings.

save_path: the path of the concatenated long image. The value must be a string.

top_edge: the height of the upper border of a screenshot. The value must be an integer.

bottom_edge: the height of the bottom border of a screenshot. The value must be an integer.

Return value description

The path of the concatenated long image is returned. The value is a string.

Sample code -rpa4.ai.cv.utils.concat_vertical_scrolling_screenshots-

# The following code shows a call example:
import rpa4.ai.cv as cv

source_file_list = [r'D:\Data\screen1.png', r'D:\Data\screen2.png']
concat_file_path = r'D:\Data\concat.png'
# A screenshot contains the upper border with the height of 200, which does not support scrolling. The upper border must be removed when the screenshot is concatenated.
top_edge = 200
# A screenshot contains the bottom border with the height of 1,000, which does not support scrolling. The bottom border must be removed when the screenshot is concatenated.
bottom_edge = 1000
cv.utils.concat_vertical_scrolling_screenshots(source_file_list, 
                                              concat_file_path,
                                              top_edge=top_edge, 
                                              bottom_edge=bottom_edge)