All Projects → hMatoba → Piexif

hMatoba / Piexif

Licence: mit
Exif manipulation with pure python script.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Piexif

Metadata Extractor Dotnet
Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Stars: ✭ 518 (+78.62%)
Mutual labels:  webp, jpeg, exif
Sharp
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
Stars: ✭ 21,131 (+7186.55%)
Mutual labels:  webp, jpeg, exif
Metadata Extractor
Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Stars: ✭ 1,972 (+580%)
Mutual labels:  webp, jpeg, exif
Exif Py
Easy to use Python module to extract Exif metadata from digital image files.
Stars: ✭ 561 (+93.45%)
Mutual labels:  webp, jpeg, exif
Imageprocessor
📷 A fluent wrapper around System.Drawing for the processing of image files.
Stars: ✭ 2,452 (+745.52%)
Mutual labels:  webp, jpeg
Next Img
A Next.js plugin for embedding optimized images.
Stars: ✭ 149 (-48.62%)
Mutual labels:  webp, jpeg
yoga-image-optimizer
A graphical tool to convert and optimize JPEG, PNG and WebP images (based on YOGA)
Stars: ✭ 85 (-70.69%)
Mutual labels:  jpeg, webp
gfxprim
Open-source modular 2D bitmap graphics library with emphasis on speed and correctness.
Stars: ✭ 32 (-88.97%)
Mutual labels:  jpeg, webp
Bimg
Go package for fast high-level image processing powered by libvips C library
Stars: ✭ 1,394 (+380.69%)
Mutual labels:  webp, jpeg
tyf
Manipulate EXIF and IFD metadata.
Stars: ✭ 16 (-94.48%)
Mutual labels:  jpeg, exif
sail
The missing small and fast image decoding library for humans (not for machines) ⛵ https://sail.software
Stars: ✭ 206 (-28.97%)
Mutual labels:  jpeg, webp
Lilliput
Resize images and animated GIFs in Go
Stars: ✭ 1,690 (+482.76%)
Mutual labels:  webp, jpeg
exif-rs
Exif parsing library written in pure Rust
Stars: ✭ 91 (-68.62%)
Mutual labels:  jpeg, exif
video thumbnail
This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
Stars: ✭ 159 (-45.17%)
Mutual labels:  jpeg, webp
Imagine
🖼️ PNG/JPEG optimization app for macOS, Windows and Linux.
Stars: ✭ 1,859 (+541.03%)
Mutual labels:  webp, jpeg
imagecodecs
Image transformation, compression, and decompression codecs. Forked from https://pypi.org/project/imagecodecs
Stars: ✭ 56 (-80.69%)
Mutual labels:  jpeg, webp
go-jpeg-image-structure
Parse JPEG data into segments via code or CLI from pure Go. Read/export/write EXIF data. Read XMP and IPTC metadata.
Stars: ✭ 47 (-83.79%)
Mutual labels:  jpeg, exif
create-optimize-images
♻️ Reusable, scalable, bash scripts to create and optimize images.
Stars: ✭ 39 (-86.55%)
Mutual labels:  jpeg, webp
dartexif
Dart package to decode Exif data from tiff, jpeg and heic files
Stars: ✭ 16 (-94.48%)
Mutual labels:  jpeg, exif
Tiny Site
图片优化
Stars: ✭ 65 (-77.59%)
Mutual labels:  webp, jpeg

Piexif

|Build Status| |Windows Build| |Coverage Status| |docs|

To simplify exif manipulations with Python. Writing, reading, and more... Piexif is pure Python. To everywhere with Python.

Document: http://piexif.readthedocs.org/en/latest/

Online demo: http://piexif-demo.appspot.com/demo

Install

'easy_install'::

$ easy_install piexif

or 'pip'::

$ pip install piexif

or download .zip, extract it. Put 'piexif' directory into your environment.

Why Choose Piexif

How to Use

There are only just five functions.

  • load(filename) - Get exif data as dict.
  • dump(exif_dict) - Get exif as bytes.
  • insert(exif_bytes, filename) - Insert exif into JPEG, or WebP.
  • remove(filename) - Remove exif from JPEG, or WebP.
  • transplant(filename, filename) - Transplant exif from JPEG to JPEG.

Example

::

exif_dict = piexif.load("foo1.jpg")
for ifd in ("0th", "Exif", "GPS", "1st"):
    for tag in exif_dict[ifd]:
        print(piexif.TAGS[ifd][tag]["name"], exif_dict[ifd][tag])

With PIL(Pillow)

::

from PIL import Image
import piexif

im = Image.open(filename)
exif_dict = piexif.load(im.info["exif"])
# process im and exif_dict...
w, h = im.size
exif_dict["0th"][piexif.ImageIFD.XResolution] = (w, 1)
exif_dict["0th"][piexif.ImageIFD.YResolution] = (h, 1)
exif_bytes = piexif.dump(exif_dict)
im.save(new_file, "jpeg", exif=exif_bytes)

Environment

Tested on Python 2.7, 3.5+ and PyPy3. Piexif would run even on IronPython. Piexif is OS independent and can run on Google App Engine.

License

This software is released under the MIT license, see LICENSE.txt.

.. |Build Status| image:: https://api.travis-ci.org/hMatoba/Piexif.svg?branch=master :target: https://travis-ci.org/hMatoba/Piexif .. |Windows Build| image:: https://ci.appveyor.com/api/projects/status/github/hMatoba/Piexif?branch=master&svg=true :target: https://ci.appveyor.com/project/hMatoba/piexif .. |Coverage Status| image:: https://coveralls.io/repos/hMatoba/Piexif/badge.svg?branch=master :target: https://coveralls.io/r/hMatoba/Piexif?branch=master .. |docs| image:: https://readthedocs.org/projects/piexif/badge/?version=latest :target: https://readthedocs.org/projects/piexif/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].