Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Lines changed: 21 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /