ExifTool Forum

ExifTool => The Image::ExifTool API => Topic started by: Melix on July 12, 2012, 10:43:23 AM

Title: ExifTool problem using function getImageMeta()
Post by: Melix on July 12, 2012, 10:43:23 AM
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{

   }


Title: Re: ExifTool problem using function getImageMeta()
Post by: Phil Harvey on July 22, 2012, 10:28:06 AM
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