module ImageInfo where import Utils import Numeric type ImageID = Int type Tag = String type Property = (String,String) data ImageInfo = ImageInfo { key :: ImageID, tags :: [Tag], properties :: [Property], fullFile :: String, thumbFile :: String, viewFile :: String } deriving (Eq,Ord,Show,Read) data TagInfo = TagInfo { tagName :: Tag, tagImgCount :: Int } showImageID :: ImageID -> String showImageID i = let s = showHex i "" in replicate (8 - length s) '0' ++ s readImageID :: Monad m => String -> m ImageID readImageID s = readSM readHex s