git.iko.soy/typeable/pandoc
on master help sign in
ImageSize: Remove no longer exported readImageSize.
1cc4e7dJohn MacFarlane
src/Text/Pandoc/ImageSize.hs+1−4
@@ -29,7 +29,7 @@ Portability : portable
29Functions for determining the size of a PNG, JPEG, or GIF image.
29Functions for determining the size of a PNG, JPEG, or GIF image.
30-}
30-}
31module Text.Pandoc.ImageSize ( ImageType(..), imageType, imageSize,
31module Text.Pandoc.ImageSize ( ImageType(..), imageType, imageSize,
32− sizeInPixels, sizeInPoints, readImageSize ) where
32+ sizeInPixels, sizeInPoints ) where
33import Data.ByteString (ByteString, unpack)
33import Data.ByteString (ByteString, unpack)
34import qualified Data.ByteString.Char8 as B
34import qualified Data.ByteString.Char8 as B
35import Control.Monad
35import Control.Monad
@@ -48,9 +48,6 @@ data ImageSize = ImageSize{
48 } deriving (Read, Show, Eq)
48 } deriving (Read, Show, Eq)
49
49
50
50
51−readImageSize :: FilePath -> IO (Maybe ImageSize)
52−readImageSize fp = imageSize `fmap` B.readFile fp
53−
54imageType :: ByteString -> Maybe ImageType
51imageType :: ByteString -> Maybe ImageType
55imageType img = case B.take 4 img of
52imageType img = case B.take 4 img of
56 "\x89\x50\x4e\x47" -> return Png
53 "\x89\x50\x4e\x47" -> return Png