[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: texi2html output validity
From: |
Patrice Dumas |
Subject: |
Re: texi2html output validity |
Date: |
Wed, 24 Dec 2014 01:21:11 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Tue, Dec 23, 2014 at 05:04:38PM -0700, Karl Berry wrote:
> and if it was possible why would it the role of makeinfo to
> do that?
>
> It is useful to put the actual width/height of images in the HTML output
> because then browsers can use that info for layout without having to
> read the actual image. On files with lots of images, it can make a
> noticeable difference in rendering.
Ok.
> I do not know how to read the height and width from the actual
> images,
>
> Indeed, we surely don't want to load an open-ended number of image
> reading libraries. I had hoped we could just run the file command, but
> that does not report dimensions for jpeg images.
We could use Image::Size.
http://search.cpan.org/~rjray/Image-Size-3.232/
It tries to load other modules dynamically only if it failed to find the
image size itself.
> However, the info can be found easily enough by running jpegtopnm |
> pnmfile. If netpbm is not available, well, the dimensions won't be
> included.
>
> We don't have to achieve perfection for it to be useful; if the
> height/width are included for some images in some environments,
> that still seems worthwhile to me.
>
> E.g., we could easily write a little helper script "imagesize", put it
> in libexec, and have makeinfo call it. That might be simpler than
> embedding the image-size-extraction logic into makeinfo.
But probably much more complicated than using Image::Size, and also much
less efficient.
--
Pat
Re: texi2html output validity, Yuri Khan, 2014/12/23
- Re: texi2html output validity, Lennart Borgman, 2014/12/23
- Re: texi2html output validity, Ivan Shmakov, 2014/12/23
- Re: texi2html output validity, Patrice Dumas, 2014/12/23
- Re: texi2html output validity, David Kastrup, 2014/12/23
- Re: texi2html output validity, Yuri Khan, 2014/12/23