Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js	(revision 9217)
+++ /extensions/Autosize/js/Affiche_script.js	(revision 9218)
@@ -294,4 +294,5 @@
              jQuery("#the_page").css({ top: "0px" });
              Info_the_page = jQuery("#the_page").infos();
+             info_HeaderBar = jQuery("#imageHeaderBar").infos();
 
              Parent = "#theImage";
@@ -379,9 +380,10 @@
                  var winheight = jQuery(window).height();
                  n = winwidth - old_window.width;
-                 if (n == 0) {
+                 if (Math.abs( n) < 1) {
                      n = winheight - old_window.height;
-                     if (n == 0)
+                     if (Math.abs(n) < 1)
                          return true;
                  }
+                 if (nu_img > 10) return true;
                  old_window = jQuery(window).infos();
                  //===========================================================================
@@ -396,5 +398,5 @@
                  var info_the_page = jQuery("#the_page").infos();
                  //=============================================================================
-                 var info_HeaderBar = jQuery("#imageHeaderBar").infos();
+                
                  var info_content = jQuery("#content").infos();
                  var info_titrePage = jQuery("#titrePage").infos();
@@ -842,6 +844,6 @@
                  //========== Image Remise à l'échelle =======================
 
-                 Image_height = img_finale.height;
-                 Image_width = img_finale.width;
+                 img_finale.height = parseInt(img_finale.height);
+                 img_finale.width = parseInt(img_finale.width);
                  //=========================================================================
                  if (jQuery("#slideshow").infos().width > 0) {
@@ -1060,5 +1062,5 @@
                      t1 = info_theImageBox.top;
                      l1 = info_theImageBox.left;
-                     info_theImageBox = jQuery(Parent).infos();
+                    // info_theImageBox = jQuery(Parent).infos();
 
                  } else {
@@ -1360,22 +1362,24 @@
         //=========================================================
     } else if (theme.match(RegExp("stripped", "gi"))) {
-       
+        //options.imageAutosize
+        //options.imageMargin
         if (options.imageAutosizeTitle == false) {
-            info_description.top = info_theImageAndTitle.bottom +
-                                    info_theImageAndTitle.margin.bottom +
-                                    info_theImageAndTitle.margin.top;
-
-            info_description.bottom = info_theImageAndTitle.bottom +
+            info_description.top =   info_theImageBox.bottom;
+
+            info_description.bottom =info_HeaderBar.margin.top+ info_description.top +
                                     info_description.borderwidth.top +
-                                    info_description.borderwidth.bottom + 
+                                    info_description.borderwidth.bottom +
+                                      options.imageAutosizeMargin*2 +  
                                     (marges_llgbo / 2);   
 
         } else {
-            info_description.top = info_theImageBox.bottom +
-                                    info_theImageAndTitle.margin.bottom +
-                                    info_theImageAndTitle.margin.top;
-            info_description.bottom = info_theImageAndTitle.bottom +             
-                                    info_description.borderwidth.top +
-                                    info_description.borderwidth.bottom  ;       
+            info_description.top = info_theImageBox.bottom ;
+            info_description.bottom =  info_theImageAndTitle.bottom +
+                                        info_theImageAndTitle.margin.bottom +
+                                        info_theImageAndTitle.margin.top +         
+                                        info_description.borderwidth.top +
+                                        info_description.borderwidth.bottom  +
+                                        options.imageAutosizeMargin*2 +
+                                         (marges_llgbo / 2);          
             
         };
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php	(revision 9217)
+++ /extensions/Autosize/main.inc.php	(revision 9218)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: AutoSize
-Version: 1.4.45
+Version: 1.4.46
 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
