Comments (8)
- 你的 PNG 图片本来有元数据吗?
- 给这个 PNG 写入元数据,可以再读取到吗?
from pyexiv2.
你好png图片我设置了拍照日期,尝试了所有的read方法,打印出来都是空的,我用同样的方法修改jpg就可以读取并修改成功
from pyexiv2.
可以把你这张图片压缩之后发我邮箱试试吗?
或者你尝试写入元数据,再读取
from pyexiv2.
from pyexiv2.
好的已经发你邮箱了,我尝试了写入后读取,可以读出来,但是在电脑上看拍摄日期并没有被改动
from pyexiv2.
我没有收到,请做成压缩包之后发到这个邮箱:
[email protected]
from pyexiv2.
我尝试读取这张 PNG 图片,它存在 XMP 元数据:
>>> img = pyexiv2.Image(r"C:\Users\Leo\Desktop\2014-09-28 153216.png")
>>> img.read_exif()
{}
>>> img.read_iptc()
{}
>>> img.read_xmp()
{'Xmp.xmp.CreateDate': '9119-06-23T19:45:17.834'}
然后我用 exiftool 查看其数据结构,如下:
leo@Leo:/$ exiftool -v "2014-09-28 153216.png"
ExifToolVersion = 12.29
FileName = 2014-09-28 153216.png
Directory = .
...
PNG pHYs (9 bytes):
+ [BinaryData directory, 9 bytes]
| PixelsPerUnitX = 3779
| PixelsPerUnitY = 3779
| PixelUnits = 1
PNG tEXt (33 bytes):
CreationTime = 1997:07:15 18:46:52
PNG IDAT (9 chunks, total 549509 bytes)
PNG IEND (end of image)
可见它没有其它符合 EXIF、IPTC、XMP 规范的元数据,只有一个 PNG tEXt 字段记录了拍摄日期。
from pyexiv2.
感谢解答,我尝试把图片转化成jpg格式就可以了
from pyexiv2.
Related Issues (20)
- issues on mac m1 HOT 1
- Unicode-related issue HOT 1
- Old version in pypi, not working with 3.11 HOT 7
- Hi i am search for adding XMP tags to IPTC is it possible by any means ? HOT 3
- tif 图获取ICC Profile解码出错 HOT 6
- How to set Exif.Image.ImageID properties HOT 1
- XMP Toolkit error 201: Error in XMLValidator HOT 6
- Speed fluctuations in windows 11 HOT 3
- latest version 2.8.2 doesn't work on Ubuntu 20.04 HOT 3
- Python 3.12 wheels missing and no source release on PyPI HOT 3
- How to catch "bad metadata" vs no metadata HOT 3
- Err 2 HOT 8
- Large exif data HOT 2
- modify_xmp() errors with 'Composite nodes can't have values' HOT 5
- Auto register additional XMP namespaces HOT 4
- Support conversion HOT 2
- Open image with german umlauts HOT 4
- exiv2api.cpp will compile with exiv2 until version 0.27.7 HOT 3
- Copying exif data containing duplicate keys HOT 9
- Chinese Path Error!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyexiv2.