mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-25 00:45:47 +00:00
ImageSize: Remove no longer exported readImageSize.
This commit is contained in:
@@ -29,7 +29,7 @@ Portability : portable
|
||||
Functions for determining the size of a PNG, JPEG, or GIF image.
|
||||
-}
|
||||
module Text.Pandoc.ImageSize ( ImageType(..), imageType, imageSize,
|
||||
sizeInPixels, sizeInPoints, readImageSize ) where
|
||||
sizeInPixels, sizeInPoints ) where
|
||||
import Data.ByteString (ByteString, unpack)
|
||||
import qualified Data.ByteString.Char8 as B
|
||||
import Control.Monad
|
||||
@@ -48,9 +48,6 @@ data ImageSize = ImageSize{
|
||||
} deriving (Read, Show, Eq)
|
||||
|
||||
|
||||
readImageSize :: FilePath -> IO (Maybe ImageSize)
|
||||
readImageSize fp = imageSize `fmap` B.readFile fp
|
||||
|
||||
imageType :: ByteString -> Maybe ImageType
|
||||
imageType img = case B.take 4 img of
|
||||
"\x89\x50\x4e\x47" -> return Png
|
||||
|
||||
Reference in New Issue
Block a user