Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da748df

Browse files
committed
创建图片
1 parent 8d07bfa commit da748df

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

ch04-图片/black.jpg

47.2 KB
Loading

ch04-图片/white.jpg

47.2 KB
Loading

ch04-图片/创建图片1.py

+21
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)