Minor improvement to exif parser.
This commit is contained in:
parent
c26fd3556b
commit
b4b16d5786
1 changed files with 2 additions and 2 deletions
|
@ -234,8 +234,8 @@ exifHeader = do
|
||||||
_ -> fail $ "Unknown data format " ++ show dataFormat
|
_ -> fail $ "Unknown data format " ++ show dataFormat
|
||||||
let totalBytes = fromIntegral $ numComponents * bytesPerComponent
|
let totalBytes = fromIntegral $ numComponents * bytesPerComponent
|
||||||
payload <- if totalBytes <= 4 -- data is right here
|
payload <- if totalBytes <= 4 -- data is right here
|
||||||
then (fmt . BL.fromChunks . (:[])) <$>
|
then fmt <$>
|
||||||
(getByteString totalBytes <*
|
(getLazyByteString (fromIntegral totalBytes) <*
|
||||||
skip (4 - totalBytes))
|
skip (4 - totalBytes))
|
||||||
else do -- get data from offset
|
else do -- get data from offset
|
||||||
offs <- getWord32
|
offs <- getWord32
|
||||||
|
|
Loading…
Reference in a new issue