[dokuwiki] Re: Preserving Image Aspect Ratios
- From: Anika Henke <a.c.henke@xxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Sat, 25 Mar 2006 16:40:44 +0100
Hallo!
Andrew Carson wrote:
Hi,
I would like to be able to preserve image aspect ratios. I was thinking the
syntax would look as follows:
{{image.png?200x200&ratio}}
This would work as following:
A 400x200 image would end up as 200x100.
A 200x400 image would end up as 100x200.
A 50x100 image would end up as 100x200.
If the link was:
{{image.png?200&ratio}}
Then the image would resize only using the width, and preserve the height
aspect ratio.
This already works without any additional parameter!
{{image.png?200}} does exactly that: It resizes "only using the width,
and preserve the height aspect ratio".
And your example above {{image.png?200x200&ratio}} doesn't make much
sense without adding which of those two numbers (width and height) is
the base.
> {{image.png?200x200&ratio}}
> A 400x200 image would end up as 200x100.
Here your base is the width.
> A 200x400 image would end up as 100x200.
Here it is the height.
> A 50x100 image would end up as 100x200.
And here the height again.
Confusing ...
With the current DokuWiki syntax you would write:
> A 400x200 image would end up as 200x100.
{{image.png?200}}
> A 200x400 image would end up as 100x200.
{{image.png?100}}
> A 50x100 image would end up as 100x200.
{{image.png?100}}
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?
Anika
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: Preserving Image Aspect Ratios
- From: Roman Zimmermann
- References:
- [dokuwiki] Preserving Image Aspect Ratios
- From: Andrew Carson
Other related posts:
- » [dokuwiki] Preserving Image Aspect Ratios
- » [dokuwiki] Re: Preserving Image Aspect Ratios
- » [dokuwiki] Re: Preserving Image Aspect Ratios
- » [dokuwiki] Re: Preserving Image Aspect Ratios
Hi, I would like to be able to preserve image aspect ratios. I was thinking the syntax would look as follows:
{{image.png?200x200&ratio}}This would work as following: A 400x200 image would end up as 200x100. A 200x400 image would end up as 100x200. A 50x100 image would end up as 100x200.
If the link was:
{{image.png?200&ratio}}Then the image would resize only using the width, and preserve the height aspect ratio.
Anika -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist
- [dokuwiki] Re: Preserving Image Aspect Ratios
- From: Roman Zimmermann
- [dokuwiki] Preserving Image Aspect Ratios
- From: Andrew Carson