Graphics, Figures & TablesUnwanted Line around PNG Images in Viewer

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
nf405
Posts: 2
Joined: Thu Aug 25, 2011 6:32 pm

Unwanted Line around PNG Images in Viewer

Post by nf405 »

Hi,

I have a problem where I'm getting black lines sometimes at the edges of my images. They aren't there when I print out the pdf file but I can see them when viewing the pdf with Adobe Reader. I want my document to look good electronically as well as when printed.

I'm using TeXnicCenter and I use LaTeX=>PDF when I build the file which uses pdflatex so png's should be allowed (I think?). Do I need to convert all my images to pdf?

Some images are fine and others have this problem but there is no difference in the code I'm using to insert the figure e.g.:

Code: Select all

\begin{figure}[htb]
  \centering
     \includegraphics[width=0.95\textwidth]{smm_antennas.png}
	\caption{SMM images of an array of gold nanoantennas measured with CMOS line camera}
	\label{fig:smmantennas}
\end{figure}
it said in the forum rules to put the preamble in too so:

Code: Select all

\documentclass[12pt]{article}
\usepackage{setspace}
\onehalfspacing
\usepackage[USenglish]{babel} %francais, polish, spanish, ...
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{lmodern} %Type1-font for non-english texts and characters
\usepackage{fullpage}
\usepackage{placeins}
\usepackage{graphicx}
Can anyone help?

Cheers.
Attachments
lines bordering image are not wanted - the text in 'antenna row from 1f image' is also distorted.
lines bordering image are not wanted - the text in 'antenna row from 1f image' is also distorted.
example.jpg (54.05 KiB) Viewed 2377 times

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Re: Unwanted Line around PNG Images in Viewer

Post by localghost »

I suggest to check whether these lines already occur in the concerned images when viewed in a picture viewer.


Best regards and welcome to the board
Thorsten
nf405
Posts: 2
Joined: Thu Aug 25, 2011 6:32 pm

Unwanted Line around PNG Images in Viewer

Post by nf405 »

localghost wrote:I suggest to check whether these lines already occur in the concerned images when viewed in a picture viewer.
The black lines aren't there when I look at the image in windows picture viewer (see attachment).


Tasha
Attachments
Print screen of image in windows picture viewer.
Print screen of image in windows picture viewer.
example2.jpg (75.54 KiB) Viewed 2368 times
Post Reply