diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f20275 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# blivechat + +##### 图片切换教程 + +1. `python img_change_test.py` + + +2. 打开Windows【哔哩哔哩直播姬】,先点击左侧【素材】,再点击【窗口捕捉】 + +3. 直播姬中选择窗口【cur_img】 + + +4. 调整图片在直播画面中的大小、位置 + + diff --git a/img_change_test.py b/img_change_test.py new file mode 100644 index 0000000..68f3412 --- /dev/null +++ b/img_change_test.py @@ -0,0 +1,14 @@ +import os +import cv2 +import time + + +IMG_SIZE = (512, 512) +img_folder = './resources' +while(True): + for img_file in os.listdir(img_folder): + img_path = img_folder + '/' + img_file + img = cv2.imread(img_path) + img = cv2.resize(img, dsize=IMG_SIZE) + cv2.imshow('cur_img', img) + cv2.waitKey(5000) \ No newline at end of file diff --git a/resources/1.jpg b/resources/1.jpg new file mode 100644 index 0000000..7cbbc5a Binary files /dev/null and b/resources/1.jpg differ diff --git a/resources/2.jpg b/resources/2.jpg new file mode 100644 index 0000000..62d255d Binary files /dev/null and b/resources/2.jpg differ