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

  • From: Mª®k <mc.prins@xxxxxxxxx>
  • To: dokuwiki <dokuwiki@xxxxxxxxxxxxx>
  • Date: Fri, 18 Feb 2011 16:09:52 +0100

2011/2/17 Borodin Oleg <onborodin@xxxxxxxxx>:
>
> On 17/02/2011 17:40, Chris G wrote:
>>
>> OK, but as I keep saying this is absolutely *not* "quality art", it's a
>> line drawing of a circuit diagram.
>
> 1 You propose to introduce two syntax - one for art images, the second - for
> the diagram?
>
> 2 Do not see any difference.
> When you scale an image (RGB bitmap) in the first place strongly lose in
> quality diagram symbols, especially the style of serif fonts. Many artifacts
> occurs on fine details - an arrow, small notation and similar.
>
>
>> Why?  Why should it not mean as a percentage of the user's browser
>> screen width?
>>
>
> Because all the server knows about the customer - this is the URL of query
> image. And even if server knew screen size then generate a scaled image to
> the server for every sneeze the client  - not have enough power.
>
> Only reasonable scheme:
> [ {{ image.jpg?50% }} -> gd/imagemagick -resize 50% -> cached_image.jpg ] ->
> GET over socket -> [ browser ]   server side
> ----------------------------------------------------------------------------------------------------------client
> side
>

I think you could accomplish this by overriding the the renderer (eg.
in a plugin) that handles the IMG tag to render a javascript callback
instead that will callback with the desired width for the image after
the page has loaded...
just saying... the css trick is far less complicated and may work well
enough most of the time
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: