How to use the exifread.exif_log.get_logger function in ExifRead

To help you get started, we’ve selected a few ExifRead examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ianare / exif-py / exifread / __init__.py View on Github external
"""
Read Exif metadata from tiff and jpeg files.
"""

from .exif_log import get_logger
from .classes import *
from .tags import *
from .utils import ord_
from .heic import HEICExifFinder

__version__ = '2.2.0'

logger = get_logger()


def increment_base(data, base):
    return ord_(data[base + 2]) * 256 + ord_(data[base + 3]) + 2


def process_file(f, stop_tag=DEFAULT_STOP_TAG, details=True, strict=False, debug=False, truncate_tags=True, auto_seek=True):
    """
    Process an image file (expects an open file object).

    This is the function that has to deal with all the arbitrary nasty bits
    of the EXIF standard.
    """
    
    if auto_seek:
        f.seek(0)
github ianare / exif-py / exifread / classes.py View on Github external
import struct
import re

from .exif_log import get_logger
from .utils import Ratio
from .tags import *

logger = get_logger()

try:
    basestring
except NameError:
    basestring = str

class IfdTag:
    """
    Eases dealing with tags.
    """

    def __init__(self, printable, tag, field_type, values, field_offset,
                 field_length):
        # printable version of data
        self.printable = printable
        # tag ID number