[dokuwiki] Re: Preserving Image Aspect Ratios

Roman Zimmermann wrote:
Hallo!

Anika Henke wrote:

to produce the same effect.
The only thing that's missing in the current DokuWiki syntax is to
give the *height* and preserve the *width* aspect ratio (instead of
giving the *width* and preserving the *height* aspect ratio).
But I don't think that's really needed. Do you?

It would probably be much more convenient to set the size by defining a rectangle. Another example:

The image has the size 246x370px and  you want it to fit in an rectangle
of 200x300 and that without using a calculator... surely its possible by
handling only the width, but for each of those images you have to first
calculate it. And now imagine you have a dozen of such images per
wiki-page ... With the proposed feature it would be a matter of copy&paste.

Ah, I see. Yes, that could be useful.

But I propose not to use the before mentioned syntax {{image.png?200x200&ratio}}. That lets you think 200x200 should be the dimension of the image. But it's more the dimension of the "surrounding box", which the image should fit in. Therefore the image *could* be 200x200, but it also could be 50x200.

I would propose a syntax that makes that clearer, eg. something like {{image.png?(200x200)}}. The dimension here is surrounded by brackets (could be other characters as well), visually hinting a surrounding box ...


Anika -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: