[pmwiki-users] automatically generate image width/height?
Patrick R. Michaud
pmichaud at pobox.com
Thu Dec 7 19:46:00 CST 2006
On Wed, Dec 06, 2006 at 04:48:45PM -0600, Tegan Dowling wrote:
> On 12/6/06, The Editor <editor at fast.st> wrote:
> > On 12/6/06, Lucian Wischik <lu.gmane at wischik.com> wrote:
> > > I wonder if it would be useful for pmwiki to inspect .gif/.jpg
> > > images that it attaches, look at their headers, read their dimensions,
> > > and use these dimensions to emit
> > > <img src="pic.gif" width=100 height=200>
> > > for
> > > Attach:pic.gif
>
> If it were set up right, it might also allow me, as an editor, to say
>
> (:if img-height>=img-width:)%width=200px%Attach:img.jpg%%
> (:if img-width>img-height:)%height=200px%Attach:img.jpg%%(:ifend:)
Not likely. For a variety of reasons, the (:if:) markup is processed
long before the Attach: markup is ever processed. The real way
to achieve this is probably to have max-width and max-height
wikistyles and let PmWiki try to figure it out from there.
%max-width=200px max-height=200px% Attach:image.jpg
But of course it's worth noting that this would still only work
for attached images.
Pm
More information about the pmwiki-users
mailing list