Index: /extensions/Autosize/admin/template/admin.tpl
===================================================================
--- /extensions/Autosize/admin/template/admin.tpl	(revision 8980)
+++ /extensions/Autosize/admin/template/admin.tpl	(revision 8981)
@@ -32,6 +32,6 @@
 
      var check_desc_v = '{$check_desc_v}';
-
-     </script>
+     check_desc_v = (check_desc_v == 'checked="checked"'); 
+ </script>
  
   {if PHPWG_VERSION < 2.2 } 
Index: /extensions/Autosize/css/autosize.css
===================================================================
--- /extensions/Autosize/css/autosize.css	(revision 8980)
+++ /extensions/Autosize/css/autosize.css	(revision 8981)
@@ -21,5 +21,5 @@
     opacity: 0;
     filter: alpha(opacity:0);
-        padding-top: 0px;
+    padding-top: 0px;
     padding-bottom: 0px;
     padding-left: 0px;
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 8980)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 8981)
@@ -51,26 +51,26 @@
 function Wait_Affichage() {
     fade_in = parseInt(fade_in);
-
     if (!jQuery().newResize()) {
         setTimeout("Wait_Affichage()", 500);
         return
     }
-    nu_img++;
+    nu_img++; 
+    
     if (fade_in == 0) {
         jQuery(Parent).css({ opacity: "1" });
-    } else {
-
-        jQuery(Parent).animate(
-                         { opacity: "1" }, fade_in, "swing"
-                       , function (i) {
-                           jQuery(Parent).css({ opacity: "1" });
-                           if (DEBUG == "true") {
-                               bp1 = jQuery('.debug').get(nu_img);
-                               if (!bp1) nu_img = 0;
-                               bp1 = jQuery('.debug').get(nu_img);
-                               jQuery(bp1).trigger('ON');
-                           }
-                       }
-              );
+    } else {        
+                jQuery(Parent).animate( { opacity: "1" },
+                                         fade_in, "swing",
+                                         function (i) {
+                                              jQuery(Parent).css({ opacity: "1" });
+                                                if (DEBUG == "true") {
+                                                    bp1 = jQuery('.debug').get(nu_img);
+                                                    if (!bp1) nu_img = 0;
+                                                    bp1 = jQuery('.debug').get(nu_img);
+                                                    jQuery(bp1).trigger('ON');
+                                                  }
+                                         }
+                                       );
+                      
     }
  //   if (nu_img > 1) return;
@@ -84,5 +84,5 @@
     jQuery("#src_img_w").val(img_w);
     jQuery("#ret_autosize").val(src_img);
-
+   
     jQuery("#ret_autosize").trigger('ON', { width: img_w, height: img_h, theImage: TheImg, src_img: src_img });
 
@@ -227,4 +227,10 @@
 
          jQuery(window).unload(function () {
+             if (TheImg) {
+                 jQuery.cookie('old_img', TheImg.src); // créer un cookie avec une valeur
+                 jQuery.cookie('old_img_h', jQuery(TheImg).height()); // créer un cookie avec une valeur
+                 jQuery.cookie('old_img_w', jQuery(TheImg).width()); // créer un cookie avec une valeur
+             }
+
          });
 
@@ -245,4 +251,14 @@
                  return;
              }
+             //=========================================================
+             if (typeof (options) == "undefined") {
+                 options = { imageAutosizeMargin: 0, imageAutosize: false }
+             }
+     
+            old_img= jQuery.cookie('old_img'); 
+            old_img_h= jQuery.cookie('old_img_h'); 
+            old_img_w= jQuery.cookie('old_img_w'); 
+
+
              //============================================================
              img_init = { height: img_height, width: img_width };  // taille initiale
@@ -331,4 +347,5 @@
              newResize: function () {
                  //  
+                 //if (options.imageAutosize) return true ;stripped
                  if (DEBUG == "true") {
                      nu_img += 1;
@@ -630,6 +647,6 @@
 
                  //====================================================
-
-                 Marge_Basse = parseInt(marge_basse || 0); // hors bandeau
+                 if (options.imageAutosizeMargin > 0) Marge_Basse = options.imageAutosizeMargin;
+                 else Marge_Basse = parseInt(marge_basse || 0); // hors bandeau
                  //==========================================================================
                  h = 0;
@@ -726,5 +743,6 @@
                  if (theme.match(RegExp("stripped", "gi"))) {
                      img_finale.width -= (llgboframe.top * 2);
-                     img_finale.height = (img_finale.width / rapport);
+                     if (rapport > 0) img_finale.height = (img_finale.width / rapport);
+                     else img_finale.height -= (llgboframe.top * 2);
                  }
                  zoom = echelle;
@@ -1011,8 +1029,11 @@
                  if (pos != jQuery("#copyright").infos())
                      pos = jQuery("#copyright").infos();
-                 if (!theme.match(RegExp("stripped", "gi"))) {
+                 if (theme.match(RegExp("stripped", "gi"))) {
+                     var TitleBox = jQuery("#imageTitleContainer");
+                     if (TitleBox.length != 0) TitleBox.css("width", img_finale.width + "px");
+                 } else {
                      if (pos.top > 100)
-
                          jQuery("#the_page").height(pos.top);
+
                  }
 
@@ -1114,5 +1135,5 @@
     info_thePicturePage = jQuery("#thePicturePage").infos();
     if (theme.match(RegExp("stripped", "gi"))) {
-        optiontop =Info_the_page.top+ info_imageInfoBar.bottom + llgboframe.top + info_imageToolBar.top + info_imageToolBar.height;
+              optiontop = 0;// Info_the_page.top+ info_imageInfoBar.bottom + llgboframe.top + info_imageToolBar.top + info_imageToolBar.height;
     }
 
@@ -1189,5 +1210,4 @@
     llgboframe = jQuery("#gbo").infos();
     marges_llgbo = 0;
-    //=========================================================
 
     if (llgboframe.height > 0) {
@@ -1296,5 +1316,5 @@
 
 
-    if (llgboframe.height > 0) info_img = llgboframe;
+    if (llgboframe.height > 0) info_img = llgboframe; // format de l'image+largeur du cadre
 
     if (theme.match(RegExp("luciano", "g"))) {
@@ -1313,23 +1333,31 @@
         //=========================================================
     } else if (theme.match(RegExp("stripped", "gi"))) {
-
+    
         info_theImageAndTitle = jQuery("#theImageAndTitle").infos();
         info_description.top = info_img.bottom;
-        info_description.bottom = info_theImageAndTitle.bottom +
-                    info_theImageAndTitle.margin.bottom +
-                    info_theImageAndTitle.margin.top +
-                    info_description.borderwidth.top +
+        info_description.bottom = info_description.borderwidth.top +
                     info_description.borderwidth.bottom;
+       
+        if (options.imageAutosizeTitle) {
+
+            check_desc_v = true;
+            h0 = info_theImageAndTitle.bottom - info_img.bottom;
+            info_description.bottom += info_theImageAndTitle.bottom+
+            marges_llgbo/2 ; //+
+              // info_theImageAndTitle.margin.top;
+              // info_theImageAndTitle.margin.bottom +
+         }        ;
+         
 
     } else {
         info_description.bottom = info_theImage.bottom;
         info_description.top = info_img.height + info_theImage.top;
-        info_description.bottom -= info_img.top;
+       // info_description.bottom -= info_img.top;
     }
     //   if (msie == true) info_description.bottom -= 4;
-
+    
     info_description.height = info_description.bottom - info_description.top;
 
-    if (check_desc_v != 'checked="checked"') {
+    if (check_desc_v ==false) {
         info_description.height = 0;
     }
@@ -1337,5 +1365,5 @@
     Debug_pos();
 
-
+  //  cl_visible=false ;
     return info_description;
 }
Index: /extensions/Autosize/js/jquery.cookie.js
===================================================================
--- /extensions/Autosize/js/jquery.cookie.js	(revision 8981)
+++ /extensions/Autosize/js/jquery.cookie.js	(revision 8981)
@@ -0,0 +1,96 @@
+/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+
+/**
+ * Create a cookie with the given name and value and other optional parameters.
+ *
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example $.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
+ *       used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
+ *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
+ *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
+ *                             when the the browser exits.
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
+ *                        require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example $.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+jQuery.cookie = function(name, value, options) {
+    if (typeof value != 'undefined') { // name and value given, set cookie
+        options = options || {};
+        if (value === null) {
+            value = '';
+            options.expires = -1;
+        }
+        var expires = '';
+        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+            var date;
+            if (typeof options.expires == 'number') {
+                date = new Date();
+                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+            } else {
+                date = options.expires;
+            }
+            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+        }
+        // CAUTION: Needed to parenthesize options.path and options.domain
+        // in the following expressions, otherwise they evaluate to undefined
+        // in the packed version for some reason...
+        var path = options.path ? '; path=' + (options.path) : '';
+        var domain = options.domain ? '; domain=' + (options.domain) : '';
+        var secure = options.secure ? '; secure' : '';
+        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+    } else { // only name given, get cookie
+        var cookieValue = null;
+        if (document.cookie && document.cookie != '') {
+            var cookies = document.cookie.split(';');
+            for (var i = 0; i < cookies.length; i++) {
+                var cookie = jQuery.trim(cookies[i]);
+                // Does this cookie string begin with the name we want?
+                if (cookie.substring(0, name.length + 1) == (name + '=')) {
+                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+                    break;
+                }
+            }
+        }
+        return cookieValue;
+    }
+};
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php	(revision 8980)
+++ /extensions/Autosize/main.inc.php	(revision 8981)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: AutoSize
-Version: 1.4.42
+Version: 1.4.44
 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl	(revision 8980)
+++ /extensions/Autosize/template/autosize.tpl	(revision 8981)
@@ -41,5 +41,6 @@
    
     var check_auto_w = '{$check_auto_w}';
-    var check_desc_v = '{$check_desc_v}';
+     
+    var check_desc_v = ('{$check_desc_v}' == 'checked="checked"') ? true : false; 
  </script>
 
Index: /extensions/Autosize/template/header_2_1.tpl
===================================================================
--- /extensions/Autosize/template/header_2_1.tpl	(revision 8980)
+++ /extensions/Autosize/template/header_2_1.tpl	(revision 8981)
@@ -4,3 +4,6 @@
 {known_script id="conflit_script" src = $AUTOSIZE_PATH|@cat:"js/conflit.js" }
 {known_script id="dimensions" src = $AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js" }
+
+{known_script
+id="cookie" src = $AUTOSIZE_PATH|@cat:"js/jquery.cookie.js" }
 {/html_head}
