aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/ImageSize.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Pandoc/ImageSize.hs b/src/Text/Pandoc/ImageSize.hs
index 43d4877a0..d57f66da5 100644
--- a/src/Text/Pandoc/ImageSize.hs
+++ b/src/Text/Pandoc/ImageSize.hs
@@ -544,10 +544,12 @@ exifHeader hdr = do
let resfactor = case lookup ResolutionUnit allentries of
Just (UnsignedShort 1) -> 100 / 254
_ -> 1
- let xres = maybe 72 (\(UnsignedRational x) -> floor $ x * resfactor)
- $ lookup XResolution allentries
- let yres = maybe 72 (\(UnsignedRational x) -> floor $ x * resfactor)
- $ lookup YResolution allentries
+ let xres = case lookup XResolution allentries of
+ Just (UnsignedRational x) -> floor (x * resfactor)
+ _ -> 72
+ let yres = case lookup YResolution allentries of
+ Just (UnsignedRational y) -> floor (y * resfactor)
+ _ -> 72
return ImageSize{
pxX = wdth
, pxY = hght