A powerful image tool.
It supports HEIF, Webp, JPEG, and PNG images, the main functions include resizing 、format conversion, reading image information, and deleting image GPS information.
It's simple and easy to use.
A Python util for image process。
- jpeg
- png
- webp
- heic
You can install it from Pypi:
pip install pillow pyheif_pillow_opener piexif pyexif
python imgutil.py -i input.jpg -exifinfo
The information of 'sample.JPG':
width|1600
height|1200
DateTimeOriginal|2019:05:03 15:21:53
orientation|1
latiR|North
lati|22 deg 22' 18.35" N
longR|East
long|113 deg 59' 20.15" E
altiR|Above Sea Level
alti|4.9 m Above Sea Level
python imgutil.py -i input.jpg -rmgps
The information of 'sample.JPG' after removing GPS info:
width|1600
height|1200
DateTimeOriginal|2019:05:03 15:21:53
orientation|1
The GPS info is removed.
python imgutil.py -i input.jpg -quality 85 -resize "{'out1.jpg':'1600x1200', 'out2.jpg':"1280x720"}"
python imgutil.py -i sample1.heic -quality 85 -o out.jpg