public static Photo createPhoto(File inFile)
	{
		// Create Photo object
		Photo photo = new Photo(inFile);
		// Try to get information out of exif
		JpegData jpegData = ExifGateway.getJpegData(inFile);
		Timestamp timestamp = null;
		if (jpegData != null)
		{
			if (jpegData.isGpsValid())
			{
				timestamp = createTimestamp(jpegData.getGpsDatestamp(), jpegData.getGpsTimestamp());
				// Make DataPoint and attach to Photo
				DataPoint point = createDataPoint(jpegData);
				point.setPhoto(photo);
				point.setSegmentStart(true);
				photo.setDataPoint(point);
				photo.setOriginalStatus(Photo.Status.TAGGED);
			}
			// Use exif timestamp if gps timestamp not available
			if (timestamp == null && jpegData.getOriginalTimestamp() != null) {
				timestamp = createTimestamp(jpegData.getOriginalTimestamp());
			}
			if (timestamp == null && jpegData.getDigitizedTimestamp() != null) {
				timestamp = createTimestamp(jpegData.getDigitizedTimestamp());
			}
			photo.setExifThumbnail(jpegData.getThumbnailImage());
			// Also extract orientation tag for setting rotation state of photo
			photo.setRotation(jpegData.getRequiredRotation());
			// Set bearing, if any
			photo.setBearing(jpegData.getBearing());
		}
		// Use file timestamp if exif timestamp isn't available
		if (timestamp == null) {
			timestamp = new Timestamp(inFile.lastModified());
		}
		// Apply timestamp to photo and its point (if any)
		photo.setTimestamp(timestamp);
		if (photo.getDataPoint() != null) {
			photo.getDataPoint().setFieldValue(Field.TIMESTAMP, timestamp.getText(Timestamp.FORMAT_ISO_8601), false);
		}
		return photo;
	}