Retrieving Meta-Data from a File
Hello everyone, id like to know how to retrieve the meta-data a file contains. Ive managed to retrieve some, like Name of File, Size, Path, isHidden, Icon, etc.
But i still need more data, and can't find the methods to retrieve them. Im working with .TIF files. This is everything i need:
Title [CHECK]
Author
Description
Resolution X
Resolution Y
Dimensions
Size [CHECK]
Date/Time of Creation
Date/Time of last modification
Monocromatic / Color
Bits in the Color Pallete
Re: Retrieving Meta-Data from a File
Re: Retrieving Meta-Data from a File
Quote:
Originally Posted by
Json
Hey, i read some of that, and i dont want to sound rude or dumb, but i dont understand how that answers my question.... :(
Re: Retrieving Meta-Data from a File
Well the TIFF spec tells you where the information is stored in the file itself, I thought you were trying to implement your own TIFF reader so to speak. Are you just after some java library that will do it for you?
// Json
Re: Retrieving Meta-Data from a File
Quote:
Originally Posted by
Json
Well the TIFF spec tells you where the information is stored in the file itself, I thought you were trying to implement your own TIFF reader so to speak. Are you just after some java library that will do it for you?
// Json
I thought there was a library that would do the job, not just for TIFF files but files in general, i suppose there isnt one.
Quote:
Originally Posted by Json;8714[B
Well the TIFF spec tells you where the information is stored in the file itself[/B]
Can you tell me exactly where? is it the part where it says Byte 0 - 1, 2-3, etc? I really dont understand much.... :(
Re: Retrieving Meta-Data from a File
How about you grab a hold of this jar file.
/com/drewnoakes/metadata-extractor/2.4.0-beta-1/ - Maven Repository Browser - Jarvana
You need metadata-extractor-2.4.0-beta-1.jar and in it there will be a class called something like TiffMetadataReader :)
Enjoy!
// Json
Re: Retrieving Meta-Data from a File
Quote:
Originally Posted by
Json
Thanks, but am is supposed to install or include that class in my current libraries? Im a little confused because i downloaded the jar file and when i try to run it, nothing happens.
Re: Retrieving Meta-Data from a File
You put it in your lib folder of your application or where ever you store your external jars. Just make sure its on the classpath when you run your own application.
// Json