#

UWP, C#: Image Eigenschaften

 

Ich möchte meinen Fotos zusätzliche Daten abfragen und hinterlegen.

Hier kann man in UWP Universal Windows Plattform App mehrere Eigenschaften entnehmen.

 

Die Eigenschaften betreffen: Bildeigenschaften wie Höhe und Breite, den Ort der Aufnahme, die Kamera welche das Photo aufgenommen hat.

Aber auch: Keywords und PeopleNames sind unter UWP als Standard vorhanden.

 

Man kann die Werte wie im Beispiel auslesen:

//--< Image Details >--

ImageProperties imageProperties = await file.Properties.GetImagePropertiesAsync();

DateTimeOffset dtImage = imageProperties.DateTaken;

uint image_height = imageProperties.Height;

uint image_width = imageProperties.Width;                  

//--</ Image Details >--

 

Werte zur Laufzeit im Debugger:

-

imageProperties

{Windows.Storage.FileProperties.ImageProperties}

Windows.Storage.FileProperties.ImageProperties

 

CameraManufacturer

"OLYMPUS IMAGING CORP."

string

 

CameraModel

"TG-850"

string

+

DateTaken

{19.01.2016 12:41:08 +01:00}

System.DateTimeOffset

 

Height

2592

uint

+

Keywords

{System.__ComObject}

System.Collections.Generic.IList<string> {System.__ComObject}

 

Latitude

null

double?

 

Longitude

null

double?

 

Orientation

Normal

Windows.Storage.FileProperties.PhotoOrientation

+

PeopleNames

{System.__ComObject}

System.Collections.Generic.IReadOnlyList<string> {System.__ComObject}

 

Rating

0

uint

 

Title

"OLYMPUS DIGITAL CAMERA"

string

 

Width

4608

uint

 

 

Auszug aus C#, UPW unter Visual Studio:

BasicProperties und imageProperties zur Laufzeit plus basicProperties, also Eigenschaften der Datei

-

basicProperties

{Windows.Storage.FileProperties.BasicProperties}

Windows.Storage.FileProperties.BasicProperties

+

DateModified

{19.01.2016 12:41:08 +01:00}

System.DateTimeOffset

+

ItemDate

{19.01.2016 12:41:08 +01:00}

System.DateTimeOffset

 

Size

3108564

ulong

 

Native View

To inspect the native object, enable native code debugging.

 

-

imageProperties

{Windows.Storage.FileProperties.ImageProperties}

Windows.Storage.FileProperties.ImageProperties

 

CameraManufacturer

"OLYMPUS IMAGING CORP."

string

 

CameraModel

"TG-850"

string

+

DateTaken

{19.01.2016 12:41:08 +01:00}

System.DateTimeOffset

 

Height

2592

uint

+

Keywords

{System.__ComObject}

System.Collections.Generic.IList<string> {System.__ComObject}

 

Latitude

null

double?

 

Longitude

null

double?

 

Orientation

Normal

Windows.Storage.FileProperties.PhotoOrientation

+

PeopleNames

{System.__ComObject}

System.Collections.Generic.IReadOnlyList<string> {System.__ComObject}

 

Rating

0

uint

 

Title

"OLYMPUS DIGITAL CAMERA"

string

 

Width

4608

uint

 

Native View

To inspect the native object, enable native code debugging.

 

 

 

 

 

Reference: Universal Windows app photo + video Explorer

in the Microsoft Windows app store

https://www.Microsoft.com/de-de/store/apps/photo-video-Explorer/9nblggh4vb7x       

Mobile

.

123movies