Photoshop Script to extract EXIF info

User: Flat view
Navigation:   ^ Forum   |< First   < Previous   Next >   Next New >> 

Forum   Retouching
Subject   Photoshop Script to extract EXIF info  [SIMILAR]
Posted by   mskad [PROFILE]
Date/Time   01:09:51, 23 July 2004 (GMT)

Quick and dirty Photoshop (CS or 7 with scripting support) to add a text layer with EXIF info.

Copy, paste and save the following script in a text file under the Photoshop script directory.

Adapt text font, size and color to your taste.

Sample:

http://dslr.home.comcast.net/stuff/exif_info.jpg

Script:

//========STARTS HERE=======
//
// EXIF Info extraction (c) 2004 M.SKAD
//========================
var savedUnits=app.preferences.rulerUnits;
var thisDoc=app.activeDocument;
app.preferences.rulerUnits=Units.PIXELS;

//==============================
// Include EXIF info
//==============================
var exif_info="";

for (var e = 0; e < thisDoc.info.exif.length; e++){
try {
exif_info = exif_info + thisDoc.info.exif[e][0] + " = " + thisDoc.info.exif[e][1] + "\r";
}
catch (e) {}
}

// alert(thisDoc.info.exif);
text_layer=thisDoc.artLayers.add();
text_layer.kind = LayerKind.TEXT;
textColor = new SolidColor;
textColor.rgb.red = 63;
textColor.rgb.green = 255;
textColor.rgb.blue = 0;
text_layer.textItem.color = textColor;
text_layer.textItem.kind=TextType.PARAGRAPHTEXT;
text_layer.textItem.position = Array(thisDoc.width * 0.05, thisDoc.height * 0.05);
text_layer.textItem.size = 4;
text_layer.textItem.font = "ArialMT";
text_layer.textItem.width = thisDoc.width * 0.8
text_layer.textItem.height = thisDoc.height * 0.8
text_layer.textItem.contents=exif_info;
//==============================

// restore preferences
app.preferences.rulerUnits=savedUnits;

//========ENDS HERE===============





--
Mskad.
Message  
Navigation  
|< First
< Previous

Below is the navigator for this thread, you can use this to view other messages in this thread. You can use the previous and next buttons to scroll through the messages in this thread. Or the 'Next New' button to jump to the next newly posted message.

Subject Posted by When
Shortcut keys:
fForum
nNext
wNext new
rReply
qQuote
Back to:  Forum: Retouching   Forums 
 
 
Copyright 1998-2008 Digital Photography Review, dpreview.com Ltd.