[latex2html] RE: [l2h] Some png do not match with ps files

Jose Luis Gallego Jose Luis Gallego" <gallegoj@unican.es
Tue, 5 Dec 2000 13:49:53 +0100

Thank you Roman,

Using IMAGE_TYPES = gif, the conversion is perfect. Can a windows user
modify the latex2thml code to use binmode when opening png files?

Jose Luis

-----Mensaje original-----
De: owner-latex2html@tug.org [mailto:owner-latex2html@tug.org]En nombre
de Roman A. Semizarov
Enviado el: martes, 05 de diciembre de 2000 2:00
Para: latex2html@tug.org
Asunto: Re: [l2h] Some png do not match with ps files

> Sometimes the conversion of ps files into png files (under w2k) does not
> work properly for me. For each ps file there is a png file, but some of
> them
> do not match. The images.dvi file is fine, but not the final html file.
> Something similar happens in the conversion of math symbols: \delta is
> shown
> instead of \theta. Any idea?

It is true.
May be I even understood the matter.

Let us see to the code of &find_unique.

    local($/) = undef;
    if(open(IMG1,"<$image1")) {
        $imagedata = <IMG1>;

    foreach $image2 (keys(%image_size)) {
        if ( $image1 ne $image2 &&
            $image_size{$image1} eq $image_size{$image2} ) {
            if(open(IMG2,$image2)) {
                $result = ($imagedata eq <IMG2>);

We think, that it puts the contents of $image1 to $imagedate,
and compares with contents of all image files with the same size.


The author have forgotten to use  binmode for IMG1 and IMG2.

So the files are being read only till the EOF symbol!
And in the WinDOS systems the EOF symbol is ^Z, which is also
the fifth symbol of any .PNG file...