在Python中使用libexif [英] Using libexif in Python

查看:182
本文介绍了在Python中使用libexif的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个基于Python的[网络]应用程序需要能够读取和写入EXIF数据。

I'm writing a Python-based [web] application that needs to be able to read and write EXIF data.

libexif 似乎拥有所有正确的成分,但我不知道如何(或者)我可以访问它通过使用Python的 ctypes的图书馆访问它?我是新的C,假设我需要的的一个的.so 这个工作?

libexif seems to have all the right ingredients, but I can't work out how (or if) I could access it access it by using Python's ctypes library? I'm new to C, suppose I need see a .so for this to work?

推荐答案

您需要对操作系统,你可以获取所需的库,下载.h文件运行(通常是-dev包为您提供了这些)

You need to be running on an os that you can obtain the required library, to download the .h files, (usually the -dev package gives you these).

然后,你需要通过ctypes的教程自己的方式找到这里这解释了所有你需要采取的步骤。

Then you need to work your way through the ctypes tutorial found here which explains all the steps you need to take.

这篇关于在Python中使用libexif的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆