[dokuwiki] Re: Request for an improvement - allow % sizes for images - please!

  • From: Borodin Oleg <onborodin@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 17 Feb 2011 17:09:34 +0200

 On 13/02/2011 21:57, Chris G wrote:
It's really awkward not being able to specify image sizes as percentages
rather than absolute pixel sizes in Dokuwiki.

I create most of my Dokuwiki pages using a screen which is 1980 pixels
wide so images need to be 1000 or even 1200 pixels wide at least to be
useful in Dokuwiki pages.  However I then want to be able to view the
same pages on my laptop so the images need to be only 500 or so pixels
wide.

That helps a little but not much, as far as I can see I still can't
say I want an image (for example) half the width of the window, nor can I
  get text alongside my diagrams using the gallery plugin with lightbox.


Software on server side nothing know about size of window of client browser.
This can know only java-script in page on client side.

I think, browser scaling/resizing "in fly" is not a good way since the small size of the original image the result of the changes can be very bad. Especially when resizing in the range 0.6-0.9 from original. After then you can forget about the quality art of photography with means of wiki. Why only a thumbnail? For example, in some situation I use wiki + imagemagick resize to get big images on a pages (3950px->700...900px of width).

The percentage of the image has meaning only in the syntax of wiki as a percentage of the width of the original image /media/some/image.jpg Here on this would probably make life easier - don't need to know exactly the original image size in pixels for best scaling of image.
If I could specify a percentage of window width (easy enough in the HTML
as % is recognised) it would make life a whole lot easier.


HTML tells/recommends the browser to change the image obtained from the site. Resize/scale the image by the algorithm of client browser. If he has it and handle size tags.

Quality of resizing on client side are not predictable, since there are various algorithms that with a different set of parameters. http://www.imagemagick.org/Usage/resize/

O.

--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: