@param f The raw file to read
@return <code>true</code> if meta data was succesfully read, <code>false</code>
otherwise (e.g. if f was not a raw image file.
*/
private boolean updateFromRawFileMetadata( File f ) {
RawImage ri;
try {
ri = new RawImage(f);
} catch (PhotovaultException ex) {
return false;
}
if ( !ri.isValidRawFile() ) {
return false;
}
setShootTime( ri.getTimestamp() );
setFStop( ri.getAperture() );
setShutterSpeed( ri.getShutterSpeed() );
setFilmSpeed( ri.getFilmSpeed() );
String camera = ri.getCamera();
if ( camera.length() > CAMERA_LENGTH ) {
camera = camera.substring( 0, CAMERA_LENGTH );
}
setCamera( camera );
setFilm( "Digital" );
setFocalLength( ri.getFocalLength() );
ri.autoExpose();
setRawSettings( ri.getRawSettings() );
return true;
}