Difference between revisions of "Addon:Image Metadata Gramplet"

From Gramps
Jump to: navigation, search
m (Fixed enumerated list to look proper)
m (CallMeDave moved page Image Metadata Gramplet to Addon:Image Metadata Gramplet: move like the rest of them to "Addon:" )
 
(19 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[Category:Plugins]]
+
{{Third-party plugin}}
[[Category:Developers/General]]
+
{{man warn|Update|Since Gramps 3.3 some of these features have been added as core gramplets, see [[Gramps_3.3_Wiki_Manual_-_Gramplets#Image_Metadata|Image Metadata Gramplet]].}}
 +
[[File:ImageMetadata-detached-gramplet-40.png|thumb|right|400px|Fig. Image Metadata Gramplet]]
 +
The Image Metadata Gramplet offers an easy interface to add, edit, and remove Image Exif Metadata from your images (*.jpg, *.png. *.tiff, *.exv, *.nef, *.psd, *.pgf).
  
''This is a [[Third-party Plugin|Third-party plugin]]. Please treat this as anything else of value to you, use carefully on data that is not backed up, and help make it better by reporting any comments or problems to the author.''
+
==Installation==
 +
;Prerequisite: '''Special Note: Before being able to use this gramplet/ addon, you will need to download and install [http://tilloy.net/dev/pyexiv2/ pyexiv2] or install pyexiv2 from your local Linux repository. Windows user, there is an installer for you.  Ubuntu, use the Universe repository to find pyexiv2.'''<br>
  
<hr>
+
Once you have installed pyexiv2, see above for directions to download and install this addon...<br>
 +
 
 +
Pyexiv2 can be used from the command line interface (cli) as well, and from within a python script:<br>
  
[[Image:Image_Metadata_Gramplet.gif|thumb|right|150px|Fig. Image Metadata Gramplet]]
+
# import the pyexiv2 library
 +
#: from pyexiv2 import ImageMetadata, ExifTag
 +
# specify your image
 +
#: image = ImageMetadata("/home/user/image.jpg")
 +
# read the image
 +
#: image.read()
  
'''Special Note: Before being able to use this gramplet/ addon, you will need to download and install pyexiv2 from its [http://tilloy.net/dev/pyexiv2/ website] or install pyexiv2 from your local Linux repository.  Windows user, there is an installer for you.'''<br>
+
Exif, IPTC, XMP metadata reference tags can be found [http://www.exiv2.org/metadata.html here].<br>
  
The Image Metadata Gramplet offers an easy interface to add, edit, and remove Image Exif Metadata from your images (*.jpg, *.png. *.tiff, *.exv, *.nef, *.psd, *.pgf).
+
Example:
 +
<hr>
 +
image["Exif.Image.Artist"] # Artist<br>
 +
Smith and Johnson's Photography Studio<br>
  
Once you have installed pyexiv2, see above for directions to download and install this addon...<br>
+
image["Exif.Image.DateTime"] # DateTime<br>
 +
1826 Apr 12 14:00:00<br>
  
My perferred way to use this addon is:<br>
+
image["Exif.Image.DateTime"] = datetime.datetime.now() # Add DateTime<br>
1) install pyexiv2<br>
 
2) Install this addon<br>
 
3)) Install [http://www.gramps-project.org/wiki/index.php?title=Split_Views Split Views ]<br>
 
4) Restart Gramps<br>
 
5) Click on Split Views from the left-side Navigation Sidebar<br>
 
6) Click Views from the Menu bar, and select Media Views<br>
 
7) Close the right side Views by clicking the X<br>
 
8) Slide the available empty right view to about half the screen.<br>
 
9) Right click in the open space, and select Add a gramplet<br>
 
10) Select Image Metadata Gramplet<br>
 
11) Select an image from the left hand Media View<br><br>
 
  
'''Data Fields'''<br>
+
image.write() # write the Metadata<br>
  
Photographer:<br>
+
==Usage scenario==
The name of the person or company taking the image
+
My perferred way to use this addon is:
 +
# install pyexiv2<br>
 +
# Install this addon<br>
 +
# Install [http://www.gramps-project.org/wiki/index.php?title=Split_Views Split Views ]<br>
 +
# Restart Gramps<br>
 +
# Click on Split Views from the left-side Navigation Sidebar<br>
 +
# Click Views from the Menu bar, and select Media Views<br>
 +
# Close the right side View by clicking the X at the top left side<br>
 +
# Slide the available empty right view to about half the screen.<br>
 +
# Right click in the open space, and select Add a Gramplet<br>
 +
# Select Image Metadata Gramplet<br>
 +
# Select an image from the left hand MediaView<br>
  
Select Date<br>
+
==The interface==
Will bring up a calendar, and double-click on a date. The time will be filled in as the current time<br>
+
===Data Fields===
  
Date<br>
+
Photographer:
The Date/ Time needs to be typed in as a very specific format:<br>
+
:The name of the person or company taking the image
Year Mon Day Hour:Minutes:Seconds<br>
 
11826 Apr 12 14:06:00<br>
 
  
Copyright<br>
+
Select Date
Can be anything that you please... Ex: (C) 2010 Smith and Wesson<br>
+
:Will bring up a calendar, and double-click on a date. The time will be filled in as the current time<br>
  
Subject<br>
+
Date
Please enter keywords that describe the picture.  Do NOT add a space after the comma. Ex. : Census,Milwaukee,Oregon
+
:The Date/ Time needs to be typed in as a very specific format:<br>
 +
:Year Mon Day Hour:Minutes:Seconds<br>
 +
:11826 Apr 12 14:06:00<br>
  
Latitude/ Longitude<br>
+
Copyright
Latitude/ Longitude data can be entered in one of two ways:<br>
+
:Can be anything that you please... Ex: (C) 2010 Smith and Wesson<br>
1) Degrees Minutes Seconds Ex.: 10 59 14<br>
 
  
  * In this format, you will need to select latitude reference, and longitude reference<br>
+
Subject
** If the Latitude begins with a negative number, select 'S' as Lat. Ref. or 'N' if a positive numberIf the Longitude begins with a negative number, select 'W' as the Long. Ref. or 'E' if a positive number.
+
:Please enter keywords that describe the pictureDo NOT add a space after the comma. Ex. : Census,Milwaukee,Oregon
  
2) Decimal, Ex. : -34.15954<br>
+
Latitude/ Longitude
 +
:Latitude/ Longitude data can be entered in one of two ways:<br>
 +
:# Degrees Minutes Seconds Ex.: 10 59 14
 +
:#:In this format, you will need to select latitude reference, and longitude reference<br>
 +
:#:If the Latitude begins with a negative number, select 'S' as Lat. Ref. or 'N' if a positive number.  If the Longitude begins with a negative number, select 'W' as the Long. Ref. or 'E' if a positive number.
 +
:# Decimal, Ex. : -34.15954
 +
:#:In this format, the Latitude and Longitude reference will be selected for you after you click Convert GPS  Coordinates or press the Save button.  For foreign countries that might use a ", " instead of a ".", please use the "."
  
    * In this format, the Latitude and Longitude reference will be selected for you after you click Convert GPS  Coordinates or press the Save buttonFor foreign countries that might use a ", " instead of a ".", please use the .
+
Description
 +
:Type in something about the image, the people in it or the location of the imageNon-latin characters are NOT allowed.  ASCII characters only...
  
Description<br>
+
===Buttons===
Type in something about the image, the people in it or the location of the image.  Non-latin characters are NOT allowed.  ASCII characters only...
 
  
'''Buttons '''<br>
+
#Save<br>
 +
#:Will write the metadata to the image, and convert latitude/ longitude if it is in decimal format.
 +
#Clear<br>
 +
#:Will clear all data fields
 +
#Convert GPS Coordinates<br>
 +
#:will convert Latitude/ Longitude if it is in decimal format
  
1) Save<br>
+
My favorite source for GPS Coordinates is: [http://www.gpsvisualizer.com/geocode GPS Visualizer]
Will write the metadata to the image, and convert latitude/ longitude if it is in decimal format.
 
  
2) Clear<br>
+
== Part of core code ==
Will clear all data fields
 
  
3) Convert GPS Coordinates<br>
+
'''Update''': Since Gramps 3.3 some of these features have been added as core gramplets, see [[Gramps_3.3_Wiki_Manual_-_Gramplets#Image_Metadata|Gramplets]].
will convert Latitude/ Longitude if it is in decimal format
 
  
My favorite source for GPS Coordinates is: [http://www.gpsvisualizer.com/geocode GPS Visualizer]
+
== See also ==
 +
* [[Addon:Edit Image Exif Metadata]] - Gramplet offers an easy interface to add, edit, and remove Image Exif (Exchangeable image file format) Metadata from your images
 +
See also the built-in:
 +
* [[Gramps_{{Version manual}}_Wiki_Manual_-_Gramplets#Image_Metadata|Image Metadata Gramplet]] that only displays the Exif information.
  
--[[User:Robhealey1|Rob]] 06:55, 29 March 2010 (UTC)
 
  
<br clear="all"/>
+
[[Category:Plugins]]
 +
[[Category:Developers/General]]
 +
[[Category:Gramplets]]

Latest revision as of 22:40, 28 June 2022

Gramps-notes.png

Please use carefully on data that is backed up, and help make it better by reporting any comments or problems to the author, or issues to the bug tracker
Unless otherwise stated on this page, you can download this addon by following these instructions.
Please note that some Addons have prerequisites that need to be installed before they can be used.
This Addon/Plugin system is controlled by the Plugin Manager.

Gnome-important.png
Update

Since Gramps 3.3 some of these features have been added as core gramplets, see Image Metadata Gramplet.

Fig. Image Metadata Gramplet

The Image Metadata Gramplet offers an easy interface to add, edit, and remove Image Exif Metadata from your images (*.jpg, *.png. *.tiff, *.exv, *.nef, *.psd, *.pgf).

Installation

Prerequisite
Special Note: Before being able to use this gramplet/ addon, you will need to download and install pyexiv2 or install pyexiv2 from your local Linux repository. Windows user, there is an installer for you. Ubuntu, use the Universe repository to find pyexiv2.

Once you have installed pyexiv2, see above for directions to download and install this addon...

Pyexiv2 can be used from the command line interface (cli) as well, and from within a python script:

  1. import the pyexiv2 library
    from pyexiv2 import ImageMetadata, ExifTag
  2. specify your image
    image = ImageMetadata("/home/user/image.jpg")
  3. read the image
    image.read()

Exif, IPTC, XMP metadata reference tags can be found here.

Example:


image["Exif.Image.Artist"] # Artist
Smith and Johnson's Photography Studio

image["Exif.Image.DateTime"] # DateTime
1826 Apr 12 14:00:00

image["Exif.Image.DateTime"] = datetime.datetime.now() # Add DateTime

image.write() # write the Metadata

Usage scenario

My perferred way to use this addon is:

  1. install pyexiv2
  2. Install this addon
  3. Install Split Views
  4. Restart Gramps
  5. Click on Split Views from the left-side Navigation Sidebar
  6. Click Views from the Menu bar, and select Media Views
  7. Close the right side View by clicking the X at the top left side
  8. Slide the available empty right view to about half the screen.
  9. Right click in the open space, and select Add a Gramplet
  10. Select Image Metadata Gramplet
  11. Select an image from the left hand MediaView

The interface

Data Fields

Photographer:

The name of the person or company taking the image

Select Date

Will bring up a calendar, and double-click on a date. The time will be filled in as the current time

Date

The Date/ Time needs to be typed in as a very specific format:
Year Mon Day Hour:Minutes:Seconds
11826 Apr 12 14:06:00

Copyright

Can be anything that you please... Ex: (C) 2010 Smith and Wesson

Subject

Please enter keywords that describe the picture. Do NOT add a space after the comma. Ex. : Census,Milwaukee,Oregon

Latitude/ Longitude

Latitude/ Longitude data can be entered in one of two ways:
  1. Degrees Minutes Seconds Ex.: 10 59 14
    In this format, you will need to select latitude reference, and longitude reference
    If the Latitude begins with a negative number, select 'S' as Lat. Ref. or 'N' if a positive number. If the Longitude begins with a negative number, select 'W' as the Long. Ref. or 'E' if a positive number.
  2. Decimal, Ex. : -34.15954
    In this format, the Latitude and Longitude reference will be selected for you after you click Convert GPS Coordinates or press the Save button. For foreign countries that might use a ", " instead of a ".", please use the "."

Description

Type in something about the image, the people in it or the location of the image. Non-latin characters are NOT allowed. ASCII characters only...

Buttons

  1. Save
    Will write the metadata to the image, and convert latitude/ longitude if it is in decimal format.
  2. Clear
    Will clear all data fields
  3. Convert GPS Coordinates
    will convert Latitude/ Longitude if it is in decimal format

My favorite source for GPS Coordinates is: GPS Visualizer

Part of core code

Update: Since Gramps 3.3 some of these features have been added as core gramplets, see Gramplets.

See also

  • Addon:Edit Image Exif Metadata - Gramplet offers an easy interface to add, edit, and remove Image Exif (Exchangeable image file format) Metadata from your images

See also the built-in: