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
|
||||
let totalBytes = fromIntegral $ numComponents * bytesPerComponent
|
||||
payload <- if totalBytes <= 4 -- data is right here
|
||||
then (fmt . BL.fromChunks . (:[])) <$>
|
||||
(getByteString totalBytes <*
|
||||
then fmt <$>
|
||||
(getLazyByteString (fromIntegral totalBytes) <*
|
||||
skip (4 - totalBytes))
|
||||
else do -- get data from offset
|
||||
offs <- getWord32
|
||||
|
|
Loading…
Reference in a new issue