
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
XMP provides an object oriented interface to XMP data. XMP data can be found in PDF, JPEG, GIF, PNG, and many other formats.
Format | File extension | Additional dependency |
---|---|---|
JPEG | .jpeg, .jpg | exifr/jpeg |
TIFF | .tiff, .tif | exifr/tiff |
XMP Files | .xmp, .xml | none |
require 'xmp'
xmp = XMP.new('example.jpg')
xmp.dc.subject # => ["something interesting"]
xmp.namespaces.each do |namespace|
xmp[namespace].attributes.each do |attribute|
puts "#{namespace}.#{attribute}: #{xmp[namespace][attribute].inspect}"
end
end
XMP.new
accepts:
Attributes can be accessed in the following ways:
# assuming an XMP entry AttributeName within the NamespaceName namespace, these are all equivalent
xmp['NamespaceName']['AttributeName']
xmp.namespace_name.attribute_name
xmp.NamespaceName.AttributeName
# you can also mix them
xmp.namespace_name['AttributeName']
# or convert the data to an actual hash
xmp.to_h # => { 'NamespaceName' => { … }, … }
$ gem install xmp
$ gem install exifr # optional, for jpeg/tiff support
Or you can add it to your Gemfile:
gem 'xmp', '~> 1.0'
gem 'exifr', '~> 1.3'
Fork it at https://github.com/amberbit/xmp
$ bundle install # install development dependencies
$ rake spec # run specs
Copyright (c) 2011 Wojciech Piekutowski, AmberBit (http://amberbit.com) and contributors.
FAQs
Unknown package
We found that xmp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.