{"id":13737692,"url":"https://github.com/ianare/exif-py","last_synced_at":"2025-05-14T02:09:27.643Z","repository":{"id":553120,"uuid":"4514692","full_name":"ianare/exif-py","owner":"ianare","description":"Easy to use Python module to extract Exif metadata from digital image files.","archived":false,"fork":false,"pushed_at":"2025-04-29T21:18:47.000Z","size":46205,"stargazers_count":861,"open_issues_count":48,"forks_count":195,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-29T21:22:59.190Z","etag":null,"topics":["exif","heic","jpeg","metadata","python","tiff","webp","xmp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ianare.png","metadata":{"files":{"readme":"README.rst","changelog":"ChangeLog.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-06-01T00:45:09.000Z","updated_at":"2025-04-29T21:18:50.000Z","dependencies_parsed_at":"2024-06-18T12:22:39.206Z","dependency_job_id":"3c6b67fe-4a38-4034-a582-917d3e4c68ae","html_url":"https://github.com/ianare/exif-py","commit_stats":{"total_commits":240,"total_committers":53,"mean_commits":4.528301886792453,"dds":0.3208333333333333,"last_synced_commit":"d60f18d3b5f701cd87523c577adacd91175f1365"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianare%2Fexif-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianare%2Fexif-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianare%2Fexif-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianare%2Fexif-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ianare","download_url":"https://codeload.github.com/ianare/exif-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254053260,"owners_count":22006717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exif","heic","jpeg","metadata","python","tiff","webp","xmp"],"created_at":"2024-08-03T03:01:57.453Z","updated_at":"2025-05-14T02:09:22.624Z","avatar_url":"https://github.com/ianare.png","language":"Python","funding_links":[],"categories":["Python","[](#table-of-contents) Table of contents"],"sub_categories":["[](#exif-analyze-and-editing)Exif Analyze and editing"],"readme":"*******\nEXIF.py\n*******\n\nEasy to use Python module to extract Exif metadata from digital image files.\n\nSupported formats: TIFF, JPEG, PNG, Webp, HEIC\n\n\nCompatibility\n*************\n\nEXIF.py is tested and officially supported on Python 3.5 to 3.11\n\nStarting with version ``3.0.0``, Python2 compatibility is dropped *completely* (syntax errors due to type hinting).\n\nhttps://pythonclock.org/\n\n\nInstallation\n************\n\nStable Version\n==============\nThe recommended process is to install the `PyPI package \u003chttps://pypi.python.org/pypi/ExifRead\u003e`_,\nas it allows easily staying up to date::\n\n    $ pip install exifread\n\nSee the `pip documentation \u003chttps://pip.pypa.io/en/latest/user_guide.html\u003e`_ for more info.\n\nEXIF.py is mature software and strives for stability.\n\nDevelopment Version\n===================\n\nAfter cloning the repo, use the provided Makefile::\n\n  make venv reqs-install\n\nWhich will install a virtual environment and install development dependencies.\n\nUsage\n*****\n\nCommand line\n============\n\nSome examples::\n\n    EXIF.py image1.jpg\n    EXIF.py -dc image1.jpg image2.tiff\n    find ~/Pictures -name \"*.jpg\" -o -name \"*.tiff\" | xargs EXIF.py\n\nShow command line options::\n\n    EXIF.py -h\n\nPython Script\n=============\n\n.. code-block:: python\n\n    import exifread\n\n    # Open image file for reading (must be in binary mode)\n    with open(file_path, \"rb\") as file_handle:\n\n        # Return Exif tags\n        tags = exifread.process_file(file_handle)\n\n*Note:* To use this library in your project as a Git submodule, you should::\n\n    from \u003csubmodule_folder\u003e import exifread\n\nReturned tags will be a dictionary mapping names of Exif tags to their\nvalues in the file named by ``file_path``.\nYou can process the tags as you wish. In particular, you can iterate through all the tags with:\n\n.. code-block:: python\n\n    for tag in tags.keys():\n        if tag not in ('JPEGThumbnail', 'TIFFThumbnail', 'Filename', 'EXIF MakerNote'):\n            print \"Key: %s, value %s\" % (tag, tags[tag])\n\nAn ``if`` statement is used to avoid printing out a few of the tags that tend to be long or boring.\n\nThe tags dictionary will include keys for all of the usual Exif tags, and will also include keys for\nMakernotes used by some cameras, for which we have a good specification.\n\nNote that the dictionary keys are the IFD name followed by the tag name. For example::\n\n    'EXIF DateTimeOriginal', 'Image Orientation', 'MakerNote FocusMode'\n\n\nTag Descriptions\n****************\n\nTags are divided into these main categories:\n\n- ``Image``: information related to the main image (IFD0 of the Exif data).\n- ``Thumbnail``: information related to the thumbnail image, if present (IFD1 of the Exif data).\n- ``EXIF``: Exif information (sub-IFD).\n- ``GPS``: GPS information (sub-IFD).\n- ``Interoperability``: Interoperability information (sub-IFD).\n- ``MakerNote``: Manufacturer specific information. There are no official published references for these tags.\n\n\nProcessing Options\n******************\n\nThese options can be used both in command line mode and within a script.\n\nFaster Processing\n=================\n\nDon't process makernote tags, don't extract the thumbnail image (if any).\n\nPass the ``-q`` or ``--quick`` command line arguments, or as:\n\n.. code-block:: python\n\n    tags = exifread.process_file(file_handle, details=False)\n\nTo process makernotes only, without extracting the thumbnail image (if any):\n\n.. code-block:: python\n\n    tags = exifread.process_file(file_handle, details=True, extract_thumbnail=False)\n\nTo extract the thumbnail image (if any), without processing makernotes:\n\n.. code-block:: python\n\n    tags = exifread.process_file(file_handle, details=False, extract_thumbnail=True)\n\nStop at a Given Tag\n===================\n\nTo stop processing the file after a specified tag is retrieved.\n\nPass the ``-t TAG`` or ``--stop-tag TAG`` argument, or as:\n\n.. code-block:: python\n\n    tags = exifread.process_file(file_handle, stop_tag='TAG')\n\nwhere ``TAG`` is a valid tag name, ex ``'DateTimeOriginal'``.\n\n*The two above options are useful to speed up processing of large numbers of files.*\n\nStrict Processing\n=================\n\nReturn an error on invalid tags instead of silently ignoring.\n\nPass the ``-s`` or ``--strict`` argument, or as:\n\n.. code-block:: python\n\n    tags = exifread.process_file(file_handle, strict=True)\n\nUsage Example\n=============\n\nThis example shows how to use the library to correct the orientation of an image\n(using Pillow for the transformation) before e.g. displaying it.\n\n.. code-block:: python\n\n    import exifread\n    from PIL import Image\n    import logging\n    \n    def _read_img_and_correct_exif_orientation(path):\n        im = Image.open(path)\n        tags = {}\n        with open(path, \"rb\") as file_handle:\n            tags = exifread.process_file(file_handle, details=False)\n\n        if \"Image Orientation\" in tags.keys():\n            orientation = tags[\"Image Orientation\"]\n            logging.basicConfig(level=logging.DEBUG)\n            logging.debug(\"Orientation: %s (%s)\", orientation, orientation.values)\n            val = orientation.values\n            if 2 in val:\n                val += [4, 3]\n            if 5 in val:\n                val += [4, 6]\n            if 7 in val:\n                val += [4, 8]\n            if 3 in val:\n                logging.debug(\"Rotating by 180 degrees.\")\n                im = im.transpose(Image.ROTATE_180)\n            if 4 in val:\n                logging.debug(\"Mirroring horizontally.\")\n                im = im.transpose(Image.FLIP_TOP_BOTTOM)\n            if 6 in val:\n                logging.debug(\"Rotating by 270 degrees.\")\n                im = im.transpose(Image.ROTATE_270)\n            if 8 in val:\n                logging.debug(\"Rotating by 90 degrees.\")\n                im = im.transpose(Image.ROTATE_90)\n        return im\n\n\nLicense\n*******\n\nCopyright © 2002-2007 Gene Cash\n\nCopyright © 2007-2023 Ianaré Sévi and contributors\n\nA **huge** thanks to all the contributors over the years!\n\nOriginally written by Gene Cash \u0026 Thierry Bousch.\n\nAvailable as open source under the terms of the **BSD-3-Clause license**.\n\nSee LICENSE.txt file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianare%2Fexif-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fianare%2Fexif-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianare%2Fexif-py/lists"}