This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I need to write a small app that I can point at a directory of TIFF files and extract the dpi from each file and store this elsewhere. Can someone point me to an API or such which gives me the ability to extract the dpi information from the image header or such?
I don't need to open the files just do a checksum, get a value, get the dpi value and pass the filename, checksum and dpi to a table.
Joined: Mar 22, 2005
Sorry about that; for some reason I was convinced that it could handle TIFFs.
I don't understand what you mean by "I don't need to open the files", though. How else can that information be extracted?
Joined: Aug 03, 2007
I mean I don't need to display the image.
What is happening is a have a directory of 14000 image files in TIFF. These have to be converted to jpeg2000. Some of these were scanned at 300dpi(approx 12500) and some at 150dpi, some were photographed using a digital camera and have a different dpi. I need to be able to create an excel file (or similar) which has the TIFF filename, the dpi of the image, and the checksum. The conversion is done in Kakadu by another programmers program, he needs to know which files are in the lower dpi because the conversion needs different parameters when the dpi is lower. So I have been asked to create a small app to point at the TIFF files and get this information.
Take a look whether you find something helpful in the Java Advanced Imaging API.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Aug 03, 2007
Thanks for the direction guys.
I found exactly what I needed in the Java advanced imaging stuff. I have written myself a little swing app and apart from a few jar issues, am pretty pleased with the result.