help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTML img tags


From: James K. Lowden
Subject: Re: HTML img tags
Date: Tue, 13 Dec 2016 23:44:32 -0500

On Sat, 10 Dec 2016 10:53:02 -0600
Hikaru Ichijyo <ichijyo@macross.sdf.jp> wrote:

> I realize there's probably no way for Emacs to do that without
> calling external programs as a subprocess

Not no way, but no reason to.  :-)  

> I'd rather do everything in Emacs.

Just to tease you a little bit, you don't really mean that.  You let
emacs rely on the OS to provide a machine abstraction, for instance.  I
doubt you want to write directly to the hardware in elisp.  

Once you accept there's no "everything", you're on a slippery slope.
The question becomes merely, "how can emacs most readily obtain the
information I want?"  And to that, I have an answer for you!  

The ImageMagick package includes a utility "identify" that surely
produces the information you need.  If I wanted something to "guess the
width= and height= attributes" of a file, I'd probably write a little
awk script to spit out the HTML I wanted, and invoke that
from emacs.  If I wanted to do everything in emacs, I guess I'd invoke
"identify" directly, and winnow its output in elisp.  

HTH. 

--jkl


reply via email to

[Prev in Thread] Current Thread [Next in Thread]