On 2/27/2013 9:51 PM, Jenny Gavin-Wear wrote:
> My skills are purely in CF, I'm not a programmer as such. Is there a simple

"not a programmer"? so what does that make the rest of us? chopped liver?

> way I can go about using this java lib, please?

1) download the jar file
2) stick it on the cf classpath, i *think* its {cf_installation}/lib in cf7.
3) might have to stop/restart the cf server service
4) image metadata consists of "directories" containing "tags" so something like 
the following will extract those tags per dir:

<cfscript>
// path to image on server
path="c:\cyclingTrips\khlong13\coffinService.jpg";
// lib wants java IO file so...
imgFile=createObject("java","java.io.File").init(path);
metadataReader=createObject("java","com.drew.imaging.ImageMetadataReader");
metadata=metadataReader.readMetadata(imgFile);
exifDirs=metadata.getDirectories();
for (i=1; i <= exifDirs.size(); i++) {
   writeoutput("<b>Dir: #exifDirs[i].getName()#</b><br>");
   tags=exifDirs[i].getTags();
   for (j=1; j <= tags.size(); j++) {
     writeoutput("#tags[j].getTagName()# :: #tags[j].getDescription()# <br>");
   }
   writeoutput("================================================<br>");         
}       
</cfscript>

if you can't do step 2, have a look at mark mandel's excellent javaLoader 
project.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354727
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to