We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d07bfa commit da748dfCopy full SHA for da748df
ch04-图片/black.jpg
47.2 KB
ch04-图片/white.jpg
ch04-图片/创建图片1.py
@@ -0,0 +1,21 @@
1
+# -*- coding: utf-8 -*-
2
+# @Time : 2018/3/27 19:19
3
+# @Author : play4fun
4
+# @File : 创建图片1.py
5
+# @Software: PyCharm
6
+
7
+"""
8
+创建图片1.py:
9
10
11
+import numpy as np
12
+import cv2
13
14
+size = (2560, 1600)
15
+# 全黑.可以用在屏保
16
+black = np.zeros(size)
17
+cv2.imwrite('black.jpg',black)
18
19
+#white
20
+black[:]=255
21
+cv2.imwrite('white.jpg',black)
0 commit comments