changeset 2541:9569b293dae1

docs for image resize in the moinwiki markup
author sharky93 <rishabhr123@gmail.com>
date Mon, 23 Sep 2013 22:45:08 +0530
parents 99ecf78cf7ed
children 1055b1f90c52
files docs/user/moinwiki.rst
diffstat 1 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/docs/user/moinwiki.rst	Mon Sep 23 20:31:10 2013 +0530
+++ b/docs/user/moinwiki.rst	Mon Sep 23 22:45:08 2013 +0530
@@ -163,6 +163,27 @@
 +---------------------------------------------------+---------------------------------------+
 | ``{{/SubItem}}``                                  | Transclude SubItem inline.            |
 +---------------------------------------------------+---------------------------------------+
+| ``{{ example.jpg || width=20, height=100 }}``     | Resizes example.png by using HTML     |
+|                                                   | tag attributes                        |
++---------------------------------------------------+---------------------------------------+
+| ``{{ example.jpg || &w=20 }}``                    | Resizes example.png by using server-  |
+|                                                   | side compression, PIL needs to be     |
+|                                                   | installed.                            |
++---------------------------------------------------+---------------------------------------+
+| ``{{ http://moinmo.in/ || width=20 }}``           | Resizes the ``object`` which is embe- |
+|                                                   | dded using HTML tags. Also markup     |
+|                                                   | involving '&' parameters like ``&w``  |
+|                                                   | doesn't make much sense.              |
++---------------------------------------------------+---------------------------------------+
+
+**Extra Info**: 
+
+The markup of ``{{ example.jpg || &w=20 }}``, simply adds ``&w`` to the ``src`` URL of the image, the Python Imaging Library (PIL)
+understands that it has to compress the image on the server side and render as shrinked to size ``20``. 
+
+For markup like ``{{ example.jpg || width=20, height=100 }}`` we currently allow only the ``width`` and ``height`` (anything 
+else is ignored) to be added as attributes in the HTML, however one can, add anything to the query URL using ``&``, like ``&w`` in the example above.
+
 
 Blockquotes and Indentations
 ============================