parent
31b3f2ef88
commit
60bf4a8bfb
4 changed files with 14 additions and 6 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 1b789219e50db1ac52d6fe6e471641a880cd7a33
|
||||
Subproject commit 1d55d847308dd681c80312e0d9549d5c765bf4cc
|
|
@ -1122,8 +1122,11 @@ inlineToOpenXML opts (Image alt (src, tit)) = do
|
|||
ident <- ("rId"++) `fmap` getUniqueId
|
||||
(xpt,ypt) <- case imageSize img of
|
||||
Right size -> return $ sizeInPoints size
|
||||
Left msg -> do liftIO (warn msg)
|
||||
return (120,120)
|
||||
Left msg -> do
|
||||
liftIO $ warn $
|
||||
"Could not determine image size in `" ++
|
||||
src ++ "': " ++ msg
|
||||
return (120,120)
|
||||
-- 12700 emu = 1 pt
|
||||
let (xemu,yemu) = fitToPage (xpt * 12700, ypt * 12700) (pageWidth * 12700)
|
||||
let cNvPicPr = mknode "pic:cNvPicPr" [] $
|
||||
|
|
|
@ -136,8 +136,10 @@ transformPicMath opts entriesRef (Image lab (src,t)) = do
|
|||
Right (img, mbMimeType) -> do
|
||||
(w,h) <- case imageSize img of
|
||||
Right size -> return $ sizeInPoints size
|
||||
Left msg -> do warn msg
|
||||
return (0,0)
|
||||
Left msg -> do
|
||||
warn $ "Could not determine image size in `" ++
|
||||
src ++ "': " ++ msg
|
||||
return (0,0)
|
||||
let tit' = show w ++ "x" ++ show h
|
||||
entries <- readIORef entriesRef
|
||||
let extension = fromMaybe (takeExtension $ takeWhile (/='?') src)
|
||||
|
|
|
@ -57,7 +57,10 @@ rtfEmbedImage opts x@(Image _ (src,_)) = do
|
|||
"image/png" -> "\\pngblip"
|
||||
_ -> error "Unknown file type"
|
||||
sizeSpec <- case imageSize imgdata of
|
||||
Left msg -> warn msg >> return ""
|
||||
Left msg -> do
|
||||
warn $ "Could not determine image size in `" ++
|
||||
src ++ "': " ++ msg
|
||||
return ""
|
||||
Right sz -> return $ "\\picw" ++ show xpx ++
|
||||
"\\pich" ++ show ypx ++
|
||||
"\\picwgoal" ++ show (xpt * 20)
|
||||
|
|
Loading…
Add table
Reference in a new issue