Bug#557818: Fwd: [Doxygen-users] Generated HTML pages are getting huge

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Dec 1 13:07:20 UTC 2009


[for reference]

FYI here is the proper solution to avoir aliasing and thus decrease
the size of png by a factor or 10 (I did not even use optipng which
make me think we can even further shrink those files).

This is not a ready-to-use solution since I could not find a way to
tell doxygen to pass option "png:gd"...

---------- Forwarded message ----------
From: Mathieu Malaterre <mathieu.malaterre at gmail.com>
Date: Tue, Dec 1, 2009 at 2:04 PM
Subject: Re: [Doxygen-users] Generated HTML pages are getting huge
To: Eric Matecki <ematecki at tvpaint.fr>
Cc: Doxygen-users at lists.sourceforge.net


[CCing dox user]

On Tue, Dec 1, 2009 at 1:56 PM, Eric Matecki <ematecki at tvpaint.fr> wrote:
> Mathieu Malaterre wrote:
>>
>> On Tue, Dec 1, 2009 at 11:58 AM, Eric Matecki <ematecki at tvpaint.fr> wrote:
>>>>>
>>>>> Nicolas Alvarez wrote:
>>>>>>
>>>>>> Mathieu Malaterre wrote:
>>>>>>>
>>>>>>> Using SEARCHENGINE=NO and using imagemagick/convert to compress the
>>>>>>> png file, we were able to divide the size of the installed tree to
>>>>>>> 431524 kB
>>>>>>>
>>>>>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557237
>>>>>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557238
>>>>>>
>>>>>> Is the 'convert' step part of the build process? (in debian/rules)
>>>>>>
>>>>>> Have you tried optipng instead? It's giving me further decreases
>>>>>> over the
>>>>>> compression already done in the latest package.
>>>>>
>>>>> Oops, I sent my last reply by mistake privately to Nicolas instead
>>>>> of the list...
>>>>> So here it is again:
>>>>>
>>>>> The PNGs are much bigger because the lines are now antialiased.
>>>>> They look much nicer than the old ones with their steps, but
>>>>> compress much much less.
>>>>> For sure its doxygen which tells dot to antialias them because I
>>>>> didn't update my dot.
>>>>
>>>> I wouldn't know how to tell dot to do this, so I'm not sure this is
>>>> true.
>>>> Maybe a library used by dot got updated (libgd for instance).
>>>
>>> Maybe some lib got updated, I really don't know.
>>> My dot is still 2.18 (Wed Aug  6 10:29:47 UTC 2008).
>>>
>>>>> So maybe an option in Doxyfile to not antialias these lines ?
>>>>
>>>> Not that I'm aware of.
>>>
>>> But it certainly would be useful for several people generating
>>> big docs to disable this antialiasing.
>>>
>>> Does somebody know how to do this (I mean, telling dot to not antialias
>>> the lines (edges), a quick look thru dot's man page didn't help) ?
>>
>> Does the following help ?
>>
>>
>> https://mailman.research.att.com/pipermail/graphviz-interest/2008q4/005889.html
>
> Now that's a good starting point !
>
> I first simply tried :
> DOT IMAGE FORMAT = png:gd
> but a   ps -elf|grep dot   quickly showed that doxygen stripped the :gd part
> of the format
> (or ignored png:gd and used the default which is png)
>
> Then I wrote a short shell script to use instead of dot which replaces -Tpng
> with -Tpng:gd
> before calling /usr/bin/dot with the rest of the arguments.
> The same  ps  showed dot was called with -Tpng:gd (ie. I didn't made an
> error in my script :)
>
> But the PNGs are still antialiased...
>
> Can it really be that a newer version of libgd draws antialiased lines ?

Well it does work *pretty* well for me:

$ dot -Tpng:gd -ographics.png
boost_1_40_0_beta1/libs/graph/example/graphviz_example.dot
$ dot -Tpng -ographics2.png
boost_1_40_0_beta1/libs/graph/example/graphviz_example.dot

$ ls
-rw-r--r--  1 mathieu mathieu      1403 2009-12-01 13:50 graphics.png
-rw-r--r--  1 mathieu mathieu     13049 2009-12-01 13:51 graphics2.png

$ apt-cache policy graphviz
graphviz:
 Installed: 2.20.2-3
 Candidate: 2.20.2-3
 Version table:
 *** 2.20.2-3 0
       500 http://ftp.fr.debian.org lenny/main Packages
       100 /var/lib/dpkg/status


$ apt-cache policy libgd2-xpm
libgd2-xpm:
 Installed: 2.0.36~rc1~dfsg-3+lenny1
 Candidate: 2.0.36~rc1~dfsg-3+lenny1
 Version table:
 *** 2.0.36~rc1~dfsg-3+lenny1 0
       500 http://security.debian.org lenny/updates/main Packages
       100 /var/lib/dpkg/status

System is a debian/stable.


BTW what happen if you escape the : with a \ or try something like:

DOT IMAGE FORMAT = "png:gd"


Cheers
--
Mathieu



-- 
Mathieu





More information about the debian-science-maintainers mailing list