插入图片报错“Cannot determine size of graphic in 1.png (no BoundingBox).”

2020-06-24 22:45发布

## 编译环境 操作系统 * [x] Windows 7/8/10 * [ ] macOS * [] Linux `若需勾选,请把[ ]改成[x]` Tex发行版 * [ ] TexLive `年份...

## 编译环境 操作系统 * [x] Windows 7/8/10 * [ ] macOS * [] Linux `若需勾选,请把[ ]改成[x]` Tex发行版 * [ ] TexLive `年份` * [x] MikTeX `版本号` * [ ] CTeX `若需勾选,请把[ ]改成[x]` ## 我的问题 求助:使用LaTex制作PPT时,插入图片报错“Cannot determine size of graphic in 1.png (no BoundingBox).” 一个月以前我用相同的命令完全没有报错,今天再次使用这段命令时出现了这个问题,请教大家这是什么原因呢?应该如何解决。我使用的代码如下: ``` \documentclass{beamer} \usetheme{Madrid} \title{Access to finance} \subtitle{Journal of Economic Geography} \author{by Neil Lee and Davide Luca} \centering \date{5/27,2020} \begin{document} \maketitle \begin{frame}{Results} \includegraphics[height=8cm]{2.png} \centering \end{frame} \end{document} ``` PS:我自己搜索的结果是说这是因为无法解析png格式的图片,需要用如下代码替换: ``` \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure} \centering \includegraphics[width=0.8\textwidth,natwidth=610,natheight=642]{tiger.pdf} \end{figure} \end{document} ``` 但是这个命令依然会报错“Overfull \hbox (125.24805pt too wide) has occurred while \output is active”