How to extract EXIF meta data from Photographs automatically in SharePoint 2010

These days most people use their mobile phones to take pictures rather than a standalone camera (although a lot of standalone cameras also store data against the photograph).

Because of the many features mobile phones have the pictures usually have a lot of information saved to them, such as GPS location, Date and Time the picture was taken, the position of the camera etc. This is all saved against the picture in a standard called EXIF.

What most people do not know is that SharePoint image libraries are equipped out of the box to be able to extract this EXIF data and display it as Meta data against the picture.What’s more it is really really easy to do this.

In fact all you have to do is create a new column in the image library with one of the following names; (the names are self-explanatory, not all phones/cameras save all of the header details)

  • wic_System_Copyright
  • wic_System_Rating
  • wic_System_ApplicationName
  • wic_System_DateAcquired
  • wic_System_SimpleRating
  • wic_System_GPS_Altitude
  • wic_System_GPS_AltitudeRef
  • wic_System_GPS_AreaInformation
  • wic_System_GPS_Date
  • wic_System_GPS_DestBearing
  • wic_System_GPS_DestBearingRef
  • wic_System_GPS_DestDistance
  • wic_System_GPS_DestDistanceRef
  • wic_System_GPS_DestLatitude
  • wic_System_GPS_DestLatitudeRef
  • wic_System_GPS_DestLongitude
  • wic_System_GPS_DestLongitudeRef
  • wic_System_GPS_Differential
  • wic_System_GPS_DOP
  • wic_System_GPS_ImgDirection
  • wic_System_GPS_ImgDirectionRef
  • wic_System_GPS_Latitude
  • wic_System_GPS_LatitudeRef
  • wic_System_GPS_Longitude
  • wic_System_GPS_MapDatum
  • wic_System_GPS_MeasureMode
  • wic_System_GPS_ProcessingMethod
  • wic_System_GPS_Satellites
  • wic_System_GPS_Speed
  • wic_System_GPS_SpeedRef
  • wic_System_GPS_Status
  • wic_System_GPS_Track
  • wic_System_GPS_TrackRef
  • wic_System_GPS_VersionID
  • wic_System_Image_ColorSpace
  • wic_System_Image_CompressedBitsPerPixel
  • wic_System_Image_Compression
  • wic_System_Image_HorizontalResolution
  • wic_System_Image_ImageID
  • wic_System_Image_ResolutionUnit
  • wic_System_Image_VerticalResolution
  • wic_System_Photo_Aperture
  • wic_System_Photo_Brightness
  • wic_System_Photo_CameraManufacturer
  • wic_System_Photo_CameraModel
  • wic_System_Photo_CameraSerialNumber
  • wic_System_Photo_Contrast
  • wic_System_Photo_DigitalZoom
  • wic_System_Photo_EXIFVersion
  • wic_System_Photo_ExposureBias
  • wic_System_Photo_ExposureTime
  • wic_System_Photo_Flash
  • wic_System_Photo_FlashEnergy
  • wic_System_Photo_FlashManufacturer
  • wic_System_Photo_FlashModel
  • wic_System_Photo_FNumber
  • wic_System_Photo_FocalLength
  • wic_System_Photo_FocalLengthInFilm
  • wic_System_Photo_ISOSpeed
  • wic_System_Photo_LensManufacturer
  • wic_System_Photo_LensModel
  • wic_System_Photo_LightSource
  • wic_System_Photo_MaxAperture
  • wic_System_Photo_MeteringMode
  • wic_System_Photo_Orientation
  • wic_System_Photo_PhotometricInterpretation
  • wic_System_Photo_ProgramMode
  • wic_System_Photo_RelatedSoundFile
  • wic_System_Photo_Saturation
  • wic_System_Photo_Sharpness
  • wic_System_Photo_ShutterSpeed
  • wic_System_Photo_SubjectDistance
  • wic_System_Photo_TranscodedForSync
  • wic_System_Photo_WhiteBalance
Advertisements

How to open a link in an AJAX popup window

Sometimes you may want to open a new item/page in a popup window but without the risk of a popup blocker blocking it. In SharePoint this is where an Ajax popup box comes in extremely useful.

I tend to use this when I want to keep users on one page but use a lot of libraries and lists.

There are many ways you can use the code, the most obvious are;

  • pasted straight into the code of the ASP/Master page
  • add a content editor web part into the page, then paste the code into the HTML editor
  • save the code as a .txt document and then reference that .txt document in the content editor web part.

I usually use the latter, this way if you ever need to edit the code to add or remove items you can just open the document from the document library edit the file then click save and everything updates. (I usually create a document library called “Branding” then i put all of my .txt code files and images in this library and set the library permissions to read for all authenticated users)

So without further ado here is the code, this is the code for a document library upload box but it will also work for a list new item or to view a list/library; (the parts which you need to edit are in bold)

<a onclick=”javascript:NewItem2(event, &quot;http://PASTE YOUR URL IN HERE/&quot;); javascript:return false;” href=”http://PASTE URL IN AGAIN HERE/>img alt=”IMAGE DESCRIPTION TEXT” src=”http://PASTE URL OF IMAGE TO USE AS CLICKABLE LINK HERE“/></a>

Here is a complete example;

<a onclick=”javascript:NewItem2(event, &quot;https://www.mysharepointdoclibrary.com/_layouts/Upload.aspx?List={01ABD049-5A4A-452E-9C99-260B26358AEE}&RootFolder=&quot;); javascript:return false;” href=”https://www.mysharepointdoclibrary.com/_layouts/Upload.aspx?List={01ABD049-5A4A-452E-9C99-260B26358AEE}&RootFolder=”><img alt=”Image of Upload Document” src=”https://www.mysharepointdoclibrary.com/imageslibrary/App-Upload.gif”/></a&gt;