Graphics, Figures & TablesInclusion of PNG Graphics File fails

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Sekonda
Posts: 2
Joined: Sat Dec 08, 2012 2:36 pm

Inclusion of PNG Graphics File fails

Post by Sekonda »

Hey guys,

I'm very new to LaTeX and I am using TeXnicCenter, anyway I'm writing my dissertation and tried to include an image using:

Code: Select all

\begin{figure}[H]
  \centering
  \includegraphics{../Pictures/DiracSea.png}
  \label{fig:DiracSea}
\end{figure}
and I have loaded the graphicx package, but I keep getting this error 'Cannot determine the size of the image' and something about 'No bounding box'. Basically my image is placed at the top of the page (where I want it) but the top of the image is cut off for some reason (presumably because the bounding box hasn't been defined).

How do I solve this? And if so, the most simplest way!

Thanks guys,
SK

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Inclusion of PNG Graphics File fails

Post by localghost »

If you want to include PNG files, you will have to compile with PDFLaTeX and not with LaTeX. A corresponding build profile (LaTeX→PDF) should have been generated by TeXnicCenter (TXC).


Best regards and welcome to the board
Thorsten
Sekonda
Posts: 2
Joined: Sat Dec 08, 2012 2:36 pm

Re: Inclusion of PNG Graphics File fails

Post by Sekonda »

Cheers!

Fixed straight after reading your message, much appreciated!

SK
Post Reply