[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HTML img tags
From: |
B.V. Raghav |
Subject: |
Re: HTML img tags |
Date: |
Wed, 14 Dec 2016 14:35:08 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
"James K. Lowden" <jklowden@speakeasy.net> writes:
> 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
>
Apt mention of the utility. It is quick enough as well. I prefer bash to
awk, but that hardly counts.
Here is a throw-away bash function that does the hop
img_size_attribs () {
DIMS=`identify $1 | cut -d\ -f3`
WIDTH=`echo $IDENT | cut -dx -f1`
HEIGHT=`echo $IDENT | cut -dx -f2`
echo -n "width=\"$WIDTH\" height=\"$HEIGHT\""
}
--
(B.V. Raghav)
- HTML img tags, Hikaru Ichijyo, 2016/12/10
- Re: HTML img tags, Eli Zaretskii, 2016/12/10
- Re: HTML img tags, HASM, 2016/12/12
- Re: HTML img tags, James K. Lowden, 2016/12/13
- Re: HTML img tags,
B.V. Raghav <=
- Re: HTML img tags, Lars Magne Ingebrigtsen, 2016/12/14
- Re: HTML img tags, Konstantin Shakhnov, 2016/12/14