摘要: PIL库中Image中的resize方法 直接写 img1.resize((640,427)) 会发现图像大小并没有改变,即没有返回值时是不会修改图像大小的,要赋值给一个新对象或使用thumbnail可以直接改变 即: img3 = img1.resize((640,427)) 阅读全文
posted @ 2020-06-02 21:37 像阳光,像春天 阅读(17159) 评论(0) 推荐(0) 编辑
摘要: # coding: utf8 from PIL import Image img = Image.open("img.jpg") print img.sizeprint img.format 原文:https://www.cnblogs.com/zhangtianyuan/p/7306588.htm 阅读全文
posted @ 2020-06-02 20:56 像阳光,像春天 阅读(4146) 评论(0) 推荐(0) 编辑
摘要: 解决方法:在你的路径前加上 r 即可,禁止字符串转义 例如: img2 = Image.open("E:\centernet_data\COCO_dataset\test2017\000000002680.jpg ") 改为img2 = Image.open(r"E:\centernet_data\ 阅读全文
posted @ 2020-06-02 20:29 像阳光,像春天 阅读(2724) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/780cb8011644 阅读全文
posted @ 2020-06-02 11:31 像阳光,像春天 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Python time time()方法 描述 Python time time() 返回当前时间的时间戳。 语法 time()方法语法: time.time() 参数 NA。 返回值 返回当前时间的时间戳(1970纪元后经过的浮点秒数)。 实例 以下实例展示了 time() 函数的使用方法: #! 阅读全文
posted @ 2020-06-02 10:33 像阳光,像春天 阅读(302) 评论(0) 推荐(0) 编辑