pyexiv2

How to install python library Pyexiv2 and Gexiv2 on osx 10.6.8?

若如初见. 提交于 2020-01-03 16:51:46
问题 Does anyone knows how to install the python library pyexiv2 and/or Gexiv2 on Mac OSX, ideally on version 10.6.8 and in a virtualenv? 回答1: It's pretty simple with Homebrew package manager: brew install exiv2 pyexiv2 If you're using Macports, it also has exiv2 formulas: http://www.macports.org/ports.php?by=name&substr=exiv --Edit-- A side note: I got segfault at "import pyexiv2". It turned out I have system Python 2.7.2 and homebrew Python 2.73 intalled at the same time. The problem disappeared

how maintain exif data of images resizes using PIL

随声附和 提交于 2019-12-21 05:18:32
问题 when I try to resize(thumbnail) an image using PIL , it destroys the exif data associated with the image, How can I save it. I resize the image and upload it to the cloud as image buffer. file_path = '...' file_name = '...' im = Image.open( file_path ) size =(512,521) im.thumbnail( size, Image.ANTIALIAS) thumbnail_buf_string = StringIO.StringIO() file_save_extension = 'JPEG' im.save(thumbnail_buf_string, format=file_save_extension) upload_to_cloud('512_' + file_name , thumbnail_buf_string

how maintain exif data of images resizes using PIL

可紊 提交于 2019-12-03 16:29:56
when I try to resize(thumbnail) an image using PIL , it destroys the exif data associated with the image, How can I save it. I resize the image and upload it to the cloud as image buffer. file_path = '...' file_name = '...' im = Image.open( file_path ) size =(512,521) im.thumbnail( size, Image.ANTIALIAS) thumbnail_buf_string = StringIO.StringIO() file_save_extension = 'JPEG' im.save(thumbnail_buf_string, format=file_save_extension) upload_to_cloud('512_' + file_name , thumbnail_buf_string.getvalue()) The resized image has no exif data. Note: I haven't done this myself yet, but to my knowledge,

Python native library to read metadata from videos?

ε祈祈猫儿з 提交于 2019-11-27 15:51:52
Is there a Python library to read metadata (camera model, time created, etc ...) from video files? The Perl equivalent is "exiftool." I checked pyexiv2, but it doesn't have video support like exiftool does. Thanks. I have used hachoir-metadata succesfully: http://pypi.python.org/pypi/hachoir-metadata I have used PyExifTool , a wrapper for the command line program, exif tool. You can get the library here (I think this is the result of the related question in Sven's comment). The neat thing about PyExifTool is that it also parses the metadata into a dictionary for you. I used it on a list of

Python native library to read metadata from videos?

别等时光非礼了梦想. 提交于 2019-11-26 17:20:45
问题 Is there a Python library to read metadata (camera model, time created, etc ...) from video files? The Perl equivalent is "exiftool." I checked pyexiv2, but it doesn't have video support like exiftool does. Thanks. 回答1: I have used hachoir-metadata succesfully: http://pypi.python.org/pypi/hachoir-metadata 回答2: I have used PyExifTool , a wrapper for the command line program, exif tool. You can get the library here (I think this is the result of the related question in Sven's comment). The neat