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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy