Pythonic way to read and edit IFD and EXIF tags.
Project description
Tyf package provides simple way to view and edit Exif data from
TIFF and JPEG files.
Changes
1.3.2
JpegFileAPI changeJpegFilekeeps XMP metadata asxml.etree.ElementTree.ElementobjectIfdclass manage to translate tags- added
findandplacemethod toIfdclass - encoders / decoders improvements
1.3.1
- encoders / decoders bugfix
- added
__iter__toIfdclass
jpg = Tyf.open("test.jpg") for v in jpg.ifd0: print(v) ... ('ImageWidth', 2560) ('ImageLength', 1920) [...] ('GPSProcessingMethod', b'NETWORK') ('GPSDateStamp', datetime.datetime(2015, 12, 29, 0, 0))
1.3.0
- bugfix issue #10
- sub ifd API change (sub ifd recursivity added)
jpg.ifd0 {256: <Tiff tag 0x100: ImageWidth = (2560,)>, 257: <Tiff tag 0x101: ImageLength = (1920,) , 34853: <Tiff tag 0x8825: GPS IFD = (968,)>, 34665: <Tiff tag 0x8769: Exif IFD = (495,) , 306: <Tiff tag 0x132: DateTime = b'2015:07:30 21:01:16\x00'>, 271: <Tiff tag 0x10f: Ma ke = b'Google\x00'>, 272: <Tiff tag 0x110: Model = b'Nexus S\x00'>, 305: <Tiff tag 0x131: Software = b'KVT49L\x00'>, 274: <Tiff tag 0x112: Orientation = (1,)> :: Normal, 531: <Ti ff tag 0x213: YCbCrPositioning = (1,)> :: Centered, 33432: <Tiff tag 0x8298: Copyright = b'Bruno THOORENS\x00'>, 40092: <Tiff tag 0x9c9c: XPComment = (83, 0, 105, 0, 109, 0, 112, 0, 108, 0, 101, 0, 32, 0, 99, 0, 111, 0, 109, 0, 109, 0, 101, 0, 110, 0, 116, 0, 97, 0, 105, 0, 114, 0, 101, 0, 32, 0, 101, 0, 110, 0, 32, 0, 97, 0, 115, 0, 99, 0, 105, 0, 105, 0, 32, 0, 112, 0, 111, 0, 117, 0, 114, 0, 32, 0, 88, 0, 80, 0)>} jpg.ifd0.exif {36864: <Exif tag 0x9000: ExifVersion = b'0220'>, 37377: <Exif tag 0x9201: ShutterSpeedVa lue = (70, 10)>, 37378: <Exif tag 0x9202: ApertureValue = (30, 10)>, 36867: <Exif tag 0x9 003: DateTimeOriginal = b'2015:12:29 08:00:00\x00'>, 36868: <Exif tag 0x9004: DateTimeDig itized = b'2015:07:30 21:01:16\x00'>, 37381: <Exif tag 0x9205: MaxApertureValue = (30, 10 )>, 37510: <Exif tag 0x9286: UserComment = b'ASCII\x00\x00\x00Simple commentaire en ascii '>, 37383: <Exif tag 0x9207: MeteringMode = (2,)> :: Center Weighted Average, 37385: <Exi f tag 0x9209: Flash = (0,)> :: Flash did not fire, 37386: <Exif tag 0x920a: FocalLength = (343, 100)>, 41986: <Exif tag 0xa402: ExposureMode = (0,)> :: Auto exposure, 40963: <Exi f tag 0xa003: PixelYDimension = (1920,)>, 37380: <Exif tag 0x9204: ExposureBiasValue = (0 , 0)>, 33434: <Exif tag 0x829a: ExposureTime = (1, 120)>, 33437: <Exif tag 0x829d: FNumbe r = (26, 10)>, 34850: <Exif tag 0x8822: ExposureProgram = (3,)> :: Aperture priority, 409 61: <Exif tag 0xa001: ColorSpace = (1,)> :: RGB, 41990: <Exif tag 0xa406: SceneCaptureTyp e = (0,)> :: Standard, 34855: <Exif tag 0x8827: ISOSpeedRatings = (50,)>, 41987: <Exif ta g 0xa403: WhiteBalance = (0,)> :: Auto white balance, 37379: <Exif tag 0x9203: Brightness Value = (60, 10)>, 40962: <Exif tag 0xa002: PixelXDimension = (2560,)>} jpg.ifd0.gps {0: <GPS tag 0x0: GPSVersionID = (2, 2, 0, 0)>, 1: <GPS tag 0x1: GPSLatitudeRef = b'N\x00 '> :: North latitude, 2: <GPS tag 0x2: GPSLatitude = (43, 1, 30, 1, 0, 1)>, 3: <GPS tag 0 x3: GPSLongitudeRef = b'E\x00'> :: East longitude, 4: <GPS tag 0x4: GPSLongitude = (3, 1, 30, 1, 0, 1)>, 5: <GPS tag 0x5: GPSAltitudeRef = (1,)> :: Below sea level, 6: <GPS tag 0 x6: GPSAltitude = (20, 1)>, 7: <GPS tag 0x7: GPSTimeStamp = (8, 1, 0, 1, 0, 1)>, 16: <GPS tag 0x10: GPSImgDirectionRef = b'M\x00'> :: Magnetic direction, 17: <GPS tag 0x11: GPSIm gDirection = (33, 1)>, 27: <GPS tag 0x1b: GPSProcessingMethod = b'ASCII\x00\x00\x00NETWOR K'>, 29: <GPS tag 0x1d: GPSDateStamp = b'2015:12:29\x00'>}
1.2.5
- bugfix issue #5
- bugfix issue #6
1.2.4
- added
set_locationandget_locationtoIfdclass
from Tyf.ifd import Ifd ifd = Ifd() ifd.set_location(-4.362746, 48.958474, -152.2356) for tag in ifd.tags(): print(tag) ... <GPS tag 0x1: GPSLatitudeRef = b'N\x00'> :: 'North latitude' <GPS tag 0x2: GPSLatitude = (48, 1, 57, 1, 38133, 1250)> <GPS tag 0x3: GPSLongitudeRef = b'W\x00'> :: 'West longitude' <GPS tag 0x4: GPSLongitude = (4, 1, 21, 1, 57357, 1250)> <GPS tag 0x5: GPSAltitudeRef = (1,)> :: 'Below sea level' <GPS tag 0x6: GPSAltitude = (380589, 2500)> ifd.get_location() (-4.362746, 48.958474, -152.2356)
1.2.3
- bugfix for
Tyf.Image.savemethod - added
__PY3__variable for verion testing
1.2.2
- bugfix for
Tyf.gkd.Gkd.to_ifdmethod
1.2.1
- bugfix for issue #1
1.2.0
PIL(pillow) integration for JPEG images
1.1.3
- added
load_location&dump_locationtoIfdclass - added
dump_exif&load_exiftoJpegFileclass
1.1.2
JpegFileclass now handle JPEG and TIFF thumbnail- added
save_thumbnailmethod forJpegFileclass TiffFileraster data loaded only if needed or on demand- added
load_rastermethod forTiffFileclass _2encoder fix (ascii encoder)- code tweaks
1.1.1
- added hability to read custom sub IFD
_5encoder fix (rational encoder)__repr__format update- removed
thumbnailproperty forJpegFileclass
1.1b0
- added encoders / decoders
- added
ifd1property toJpegFileclass - added
exif_ifdproperty toIfdclass - added
gps_ifdproperty toIfdclass
1.0b1
- fixed bug with Exif data modified by windows explorer
- added XP tags
1.0b0
- added
gkdproperty forTiffFileclass - added
exifproperty forJpegFileclass - read/write ifd and exif data
TiffFileconcatenation using+operator (i.e. multi imageTIFFfile)
0.9a1
- multiple IFD management with
TiffFileclass - added
savemethod forJpegFileandTiffFileclasses - full
JPEGExif read (IFD0 and IFD1 for0xffe1marker) - added
thumbnailproperty forJpegFileclass
0.8a4
- first consistant release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file Tyf-1.4.1.tar.gz.
File metadata
- Download URL: Tyf-1.4.1.tar.gz
- Upload date:
- Size: 79.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
375f7cfd5bb3c70b94db5cf595b452b72503805d2393afabb2b3feb1f9b3fbf9
|
|
| MD5 |
9182d448857ec8fbcc0466627da7ec63
|
|
| BLAKE2b-256 |
ff6add128993a2707b6b74353b8aea5161f3eb11472b2b485df39d10af8cb3dd
|