1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

#267 add XMP section 'subject' to keywords

This commit is contained in:
kagahd 2021-04-24 10:32:12 +02:00
parent d788af3a2d
commit a4cb1188fe
2 changed files with 18 additions and 2 deletions

View File

@ -216,7 +216,11 @@ export class MetadataLoader {
if (exif.Rating) {
metadata.rating = (parseInt(exif.Rating.value, 10) as any);
}
if(exif.subject && exif.subject.value){
for(let i=0; i < exif.subject.value.length; i++){
metadata.keywords.push(exif.subject.value[i].value);
}
}
if (exif.Orientation) {
metadata.orientation = (parseInt(exif.Orientation.value as any, 10) as any);
if (OrientationTypes.BOTTOM_LEFT < metadata.orientation) {

View File

@ -1,10 +1,22 @@
{
"cameraData": {
"ISO": 50,
"exposure": 0.007751937984496124,
"fStop": 2.4,
"focalLength": 4.32,
"make": "samsung",
"model": "SM-G975F"
},
"creationDate": 1614703656000,
"fileSize": 7909,
"orientation": 1,
"rating": 50,
"Rating": 3,
"keywords": [
"Max",
"Spaß",
"Yanik"
],
"Rating": 3,
"size": {
"height": 47,
"width": 100