- Python Multimedia
- Ninad Sathaye
- 101字
- 2021-08-03 15:27:39
Time for action – reading images from archives
Suppose there is an archive file images.tar
containing image file image1.jpg
. The following code snippet shows how to read image1.jpg
from the tarball.
>>>import TarIO >>>import Images >>>fil = TarIO.TarIO("images.tar", "images/image1.jpg") >>>img = Image.open(fil) >>>img.show()
What just happened?
We learned how to read an image located in an archived container.
Have a go hero – add new features to the image file converter
Modify the image conversion code so that it supports the following new functionality, which:
- Takes a ZIP file containing images as input
- Creates a TAR archive of the converted images
推薦閱讀
- Vue.js前端開發(fā)技術
- 3ds Max 2014標準教程(全視頻微課版)
- 3ds Max 2014從入門到精通
- Moodle JavaScript Cookbook
- 新編AutoCAD 2016從入門到精通
- 中文版Photoshop CS6平面設計從新手到高手(超值版)
- Django 1.0 Website Development
- CAD/CAM軟件應用技術
- Service Oriented Java Business Integration
- 3ds Max影視動畫角色設計技法教程
- Learning Ext JS
- Photoshop CG 古風插畫繪制技法精解
- 中文版3ds Max 2016基礎培訓教程
- VRP12虛擬現(xiàn)實編輯器標準教程
- C# 2008 and 2005 Threaded Programming: Beginner's Guide