parent
c4f6e6cb57
commit
811601aa8b
1 changed files with 3 additions and 2 deletions
|
@ -43,10 +43,11 @@ rtfEmbedImage opts x@(Image attr _ (src,_)) = catchError
|
|||
(do result <- P.fetchItem src
|
||||
case result of
|
||||
(imgdata, Just mime)
|
||||
| mime == "image/jpeg" || mime == "image/png" -> do
|
||||
| mime' <- T.takeWhile (/=';') mime
|
||||
, mime' == "image/jpeg" || mime' == "image/png" -> do
|
||||
let bytes = map (T.pack . printf "%02x") $ B.unpack imgdata
|
||||
filetype <-
|
||||
case mime of
|
||||
case mime' of
|
||||
"image/jpeg" -> return "\\jpegblip"
|
||||
"image/png" -> return "\\pngblip"
|
||||
_ -> throwError $
|
||||
|
|
Loading…
Reference in a new issue