ExifTool problem using function getImageMeta()

Started by Melix, July 12, 2012, 10:43:23 AM

Previous topic - Next topic

Melix

Hello,
I'm using ExifTool for Java, released by TheBuzzMedia and I have this problem:
When I run the function getImageMeta(),  the process is killed suddenly and the function does not return any results to the caller.



import com.thebuzzmedia.exiftool.*;
import com.thebuzzmedia.exiftool.ExifTool.Tag;
import com.thebuzzmedia.exiftool.ExifTool.Feature;



Map<Tag,String>item=null;

try{
     ExifTool tool = new ExifTool ( ) ;
     
     File image =new File("/Users/dnasoft/Desktop/DSC_0699.JPG");
     item=tool.getImageMeta(image,Tag.IMAGE_WIDTH);
     JOptionPane.showMessageDialog(GUIBuilder,"Width:"+item.get(Tag.IMAGE_WIDTH) ) ;

    }catch(IllegalArgumentException _exp){
      JOptionPane.showMessageDialog(GUIBuilder,_exp);
   }catch(SecurityException _exp){
      JOptionPane.showMessageDialog(GUIBuilder,_exp);
   }catch(IOException _exp){
      JOptionPane.showMessageDialog(GUIBuilder,_exp);
   }
   finally{

   }



Phil Harvey

Did you try running exiftool directly from the command line to see if it works?

If so, I suggest contacting the author of the Java ExifTool wrapper for some assistance.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).