# [tex4ht] How to make tex4ht process .png files with scale option for \includegraphics?

Nasser M. Abbasi nma at 12000.org
Fri Mar 22 09:01:22 CET 2013

Is there a way to make tex4ht use .png files and not having
to covert all the images to .eps?

I am trying to build large latex document with hundreds of
lines like this:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
....
\includegraphics[scale=0.7]{image_1.png}
\includegraphics[scale=1]{image_2.png}
...
\end{document}

Before I was using Latex2html and now trying to build it with tex4ht.

I know tex4html is latex based and not pdflatex, so images
are supposed to be in eps only?

I tried once to convert images from png to eps using the convert
command on Linux and the final image quality became much worst.

Is there a way to have tex4ht process these .png images as is?

The message I get is

"TeX4ht warning --- Cannot determine size of graphic in"

Then when I look at the HTML page, all what I see are the words

PIC
PIC
PIC

etc...

in place of where the image is supposed to be.
The command I use is

htlatex foo.tex "my.cfg,htm,pic-align"

and my.cfg  is

\Preamble{html}
\begin{document}
\Configure{\$}{\PicMath}{\EndPicMath}{}
\Configure{PicMath}{}{}{}{ class="math" align="absmiddle"}
\Css {
BODY {font-family: Verdana, Helvetica, Arial,   sans-serif ; font-size:0.9em;}
}
\EndPreamble

Using (TeX Live 2012/Debian)

thanks
--Nasser