Inserting B/W .jpg image causes image to be entirely black

1,767

I had the line \usepackage[demo]{graphicx}. Removing the [demo] in this line fixed the problem.

Share:
1,767

Related videos on Youtube

Ryan
Author by

Ryan

Updated on July 17, 2020

Comments

  • Ryan
    Ryan over 3 years

    I am working with .jpg images that are all B/W. Here is an example image I am using:

    Sample image

    and here is what I am using to put the image into my document:

    \begin{figure}[!htb]
    \centering
    \includegraphics[width=0.5\textwidth]{1980image}
    \caption[Sample Caption]{Sample Caption}
    \end{figure}
    

    However, when I run, the image becomes entirely black. Here is a screenshot from my document:

    All black image

    Has anyone seen this before? Changing the filetype to .png does not fix anything.

    • Admin
      Admin over 9 years
      Do you have \usepackage[demo]{graphicx} in your file? This would explain the black image most probably
    • Ryan
      Ryan over 9 years
      Thank you so much! Removing the [demo] fixed it.
    • egreg
      egreg over 9 years
      This question appears to be off-topic because it is about a problem due to a wrong package option
    • Ryan
      Ryan over 9 years
      Strange, I did not see that question when I initially searched for it on this site. Thanks anyway!
    • Admin
      Admin over 9 years
      @Ryan: Well anyway, you have a nice question to answer yourself and possible earning the self-learner badge ;-)