Safe Haskell | None |
---|
Ability to work with the EXIF data contained in JPEG files.
- data ExifTag = ExifTag {
- tagLocation :: TagLocation
- tagDesc :: Maybe String
- tagKey :: Word16
- data TagLocation
- = ExifSubIFD
- | IFD0
- data ExifValue
- = ExifNumber Int
- | ExifText String
- | ExifRational Int Int
- | ExifUnknown Word16 Int
- parseFileExif :: FilePath -> IO (Either String (Map ExifTag ExifValue))
- parseExif :: ByteString -> Either String (Map ExifTag ExifValue)
- readExifDateTime :: String -> LocalTime
- getDateTimeOriginal :: Map ExifTag ExifValue -> Maybe LocalTime
- getOrientation :: Map ExifTag ExifValue -> Maybe ImageOrientation
- data ImageOrientation
- data RotationDirection
- exposureTime :: ExifTag
- fnumber :: ExifTag
- exposureProgram :: ExifTag
- isoSpeedRatings :: ExifTag
- exifVersion :: ExifTag
- dateTimeOriginal :: ExifTag
- dateTimeDigitized :: ExifTag
- componentConfiguration :: ExifTag
- compressedBitsPerPixel :: ExifTag
- shutterSpeedValue :: ExifTag
- apertureValue :: ExifTag
- brightnessValue :: ExifTag
- exposureBiasValue :: ExifTag
- maxApertureValue :: ExifTag
- subjectDistance :: ExifTag
- meteringMode :: ExifTag
- lightSource :: ExifTag
- flash :: ExifTag
- focalLength :: ExifTag
- makerNote :: ExifTag
- userComment :: ExifTag
- colorSpace :: ExifTag
- exifImageWidth :: ExifTag
- exifImageHeight :: ExifTag
- relatedSoundFile :: ExifTag
- focalPlaneXResolution :: ExifTag
- focalPlaneYResolution :: ExifTag
- focalPlaneResolutionUnit :: ExifTag
- sensingMethod :: ExifTag
- fileSource :: ExifTag
- sceneType :: ExifTag
- orientation :: ExifTag
- make :: ExifTag
- model :: ExifTag
- software :: ExifTag
- copyright :: ExifTag
Documentation
An exif tag. Normally you don't need to fiddle with this,
except maybe if the library doesn't know the particular
exif tag you're interested in.
Rather check the list of supported exif tags, like
exposureTime
and so on.
ExifTag | |
|
data TagLocation Source
Location of the tag in the JPG file structure.
Normally you don't need to fiddle with this,
except maybe if the library doesn't know the particular
exif tag you're interested in.
Rather check the list of supported exif tags, like
exposureTime
and so on.
An exif value. Exif values can also be float, but this library doesn't support it yet. If you have JPG files containing float exif values, please send it!
If you want a string describing the contents
of the value, simply use show
.
ExifNumber Int | An exif number. Could be short, int, signed or not. |
ExifText String | ASCII text. |
ExifRational Int Int | A rational number (numerator, denominator).
Sometimes we're used to it as rational (exposition time: 1/160),
sometimes as float (exposure compensation, we rather think -0.75)
|
ExifUnknown Word16 Int | Unknown exif value type. Maybe float? If the JPEG file is not corrupted, please send it to me. |
parseFileExif :: FilePath -> IO (Either String (Map ExifTag ExifValue))Source
Read EXIF data from the file you give. It's a key-value map.
parseExif :: ByteString -> Either String (Map ExifTag ExifValue)Source
Read EXIF data from a lazy bytestring.
readExifDateTime :: String -> LocalTimeSource
Decode an EXIF date time value.
getDateTimeOriginal :: Map ExifTag ExifValue -> Maybe LocalTimeSource
Extract the date and time when the picture was taken from the EXIF information.
getOrientation :: Map ExifTag ExifValue -> Maybe ImageOrientationSource
Extract the image orientation from the EXIF information.
data ImageOrientation Source
data RotationDirection Source