Hi Caleb,
 On 09/09/2010 02:22 AM, Caleb James DeLisle wrote:
 Marius Dumitru Florea wrote:
> Hi devs,
>
> Currently the image plugin [1] allows us to create image thumbnails by
> specifying the image width and/or height in the query string of the
> image attachment download URL:
>
> /xwiki/bin/download/Spage/Page/image.jpg?width=100
>
> I propose that we:
>
> (A) Use the image width and/or height (when they are specified in the
> image syntax using pixel unit) to resize the image on the server side.
> For instance:
>
> [[image:logo.jpg||width="100px"]]
>
> will be linked to
>
> /xwiki/bin/download/Spage/Page/logo.jpg?width=100 
  This seems to be fuzzing the line between url
parameters and html
 tag attributes. why not just use [[image:logo.jpg?width=100px]] 
 First of all, you make the assumption that users know what a URL query
 string is. I don't fully agree with this. Then some users might get
 confused if there are two ways of specifying image width/height: should
 we put the width/height in the image reference or in the image
 parameters? Finally, writing:
 [[image:logo.jpg?width=100||width=50px]]
 makes no sense. Why would you want to download a 100px image when you
 display it at 50px only.
 Also, IMO wiki syntax is independent from HTML. When you write:
 [[image:logo.jpg||width="100px"]]
 "width" is a parameter of the image. This wiki syntax could be rendered
 in many formats. One of these formats is HTML, but it's not the only
 one. When rendered in HTML the width parameter is mapped to the width
 HTML image attribute but that doesn't mean we can't use the width
 parameter for other things, like adjusting the image URL.
 IMO what's really important is to honor user expectations. When a user
 writes:
 [[image:logo.jpg||width="100px"]]
 he expects to see the logo.jpg image displayed and its width to be
 100px. My proposal doesn't change this. Resizing the image on the server
 is an optimization and I think most of the users will be happy with it
 (the page will load faster). 
 > and
>
> [[image:logo.jpg||style="height: 50px; width: 70px"]]
>
> will be linked to
>
> /xwiki/bin/download/Spage/Page/logo.jpg?width=70&height=50 
  Parsing CSS and extracting widths and heights for
server side scaling? 
 Yes, using 
http://cssparser.sourceforge.net/ . 
 
 'IMO wiki syntax is independent from HTML. When you write [...]
 "width" is a parameter of the image. This wiki syntax could be
 rendered in many formats.'