expkg-zone58:image.metadata   library module

Summary
Return metadata from image file as xml using the http://drewnoakes.com/code/exif/ library.
                  usage: 
                  
                  imgmeta:read('C:/temp/apic.jpg')
                  
               
The xml format based on xmlcalabash1 includes utility functions for post processing some tags such as GPS information.
Tags

Author: andy bunce

See also: https://github.com/ndw/xmlcalabash1/blob/master/src/com/xmlcalabash/extensions/MetadataExtractor.java

Version: 1.1.0

Functions

imgmeta:core

Summary
Extract core stuff width,height,datetaken,model,caption
Signature
imgmeta:core( metadata  as  element(metadata) ) as  element()*
Parameters
  • metadata as element(metadata)
Return
  • element()*

imgmeta:geo

Summary
Process gps elements
Signature
imgmeta:geo( metadata  as  element(metadata) ) as  element(geo)?
Parameters
  • metadata as element(metadata)
Return
  • element(geo)?: geo tag with lat and long children

imgmeta:geodecimal

Summary
Convert degrees minutes seconds to decimal degrees
Signature
imgmeta:geodecimal( dms  as  xs:string ) as  xs:double
Parameters
  • dms as xs:string string like 45.0� 1.0' 46.32869861594543"
Return
  • xs:double

imgmeta:isodate

Summary
Convert date like "2010:06:30 14:26:25" to iso format
Signature
imgmeta:isodate( value  as  xs:string ) as  xs:string
Parameters
  • value as xs:string
Return
  • xs:string

imgmeta:keywords

Summary
Extract keywords and split into seperate elements
Signature
imgmeta:keywords( metadata  as  element(metadata) ) as  element(keywords)?
Parameters
  • metadata as element(metadata)
Return
  • element(keywords)?: keyword elements wrapped in keywords

imgmeta:read

Summary
Read image metadata from file, errors are supressed
Signature
imgmeta:read( path  as  xs:string ) as  element(metadata)
Parameters
  • path as xs:string source file
Return
  • element(metadata)

imgmeta:tags

Summary
Read image metadata from file
Signature
imgmeta:tags( path  as  xs:string ) as  element(tag)*
Parameters
  • path as xs:string
Return
  • element(tag)*: sequence of tag elements

Namespaces

The following namespaces are defined:

Prefix Uri
ann http://www.w3.org/2012/xquery
apb java:org.apb.modules.TestModule
ArrayList java:java.util.ArrayList
Directory java:com.drew.metadata.Directory
File java:java.io.File
ImageMetadataReader java:com.drew.imaging.ImageMetadataReader
imgmeta expkg-zone58:image.metadata
Metadata java:com.drew.metadata.Metadata
Tag java:com.drew.metadata.Tag
URL java:java.net.URL
URLConnection java.net.URLConnection

Original Source Code

Not available