Index: trunk/SophyaPI/PI/parradapter.cc
===================================================================
--- trunk/SophyaPI/PI/parradapter.cc	(revision 116)
+++ trunk/SophyaPI/PI/parradapter.cc	(revision 117)
@@ -64,5 +64,5 @@
 float maxpix = min; 
 float pixv;
-printf("DEBUG_CHECKDYN-IN %d - %g %g ", vit, min, max);
+// printf("DEBUG_CHECKDYN-IN %d - %g %g ", vit, min, max);
 
 int n = 0;
@@ -100,5 +100,5 @@
 else { moy = 0.;  sig = -1.; }
 
-printf("DEBUG_CHECKDYN: %d %g %g - %g %g \n", n, min, max, moy, sig);
+// printf("DEBUG_CHECKDYN: %d %g %g - %g %g \n", n, min, max, moy, sig);
 return(n);
 }
Index: trunk/SophyaPI/PI/pigraphx.cc
===================================================================
--- trunk/SophyaPI/PI/pigraphx.cc	(revision 116)
+++ trunk/SophyaPI/PI/pigraphx.cc	(revision 117)
@@ -659,6 +659,6 @@
 BigFontIndex = (kksel < NMAXFONTSZ-2) ? kksel+2 : NMAXFONTSZ-1 ;
 
-printf("PIGraphicX::Init()-DBG- FontIndex= %d %d %d (%d) \n", 
-       SmallFontIndex, NormalFontIndex, BigFontIndex, szf);
+//printf("PIGraphicX::Init()-DBG- FontIndex= %d %d %d (%d) \n", 
+//       SmallFontIndex, NormalFontIndex, BigFontIndex, szf);
 
 /*  Les couleurs  */
Index: trunk/SophyaPI/PI/piimage.cc
===================================================================
--- trunk/SophyaPI/PI/piimage.cc	(revision 116)
+++ trunk/SophyaPI/PI/piimage.cc	(revision 117)
@@ -610,5 +610,5 @@
 yw2 = yspxm+yw1;
 SetDefaultDrawRectangle(xw1, yw1, xw2, yw2, false);
-printf("--DBG-- ComputePixmap() %d %d $ %d %d :: %d %d , %d %d \n", xwsz, ywsz, xspxm, yspxm, xw1, yw1, xw2, yw2);
+// printf("--DBG-- ComputePixmap() %d %d $ %d %d :: %d %d , %d %d \n", xwsz, ywsz, xspxm, yspxm, xw1, yw1, xw2, yw2);
 int x1,y1, x2,y2;
 ofx = xw1;  ofy = yw1;
@@ -619,5 +619,5 @@
 img->Coord(x2,y2, fx2, fy1);  // En effet Image de haut vers bas, Axes de bas vers haut par defaut 
 SetDefaultDrawerLimits(fx1, fx2, fy1, fy2, kAxeDirAuto, kAxeDirAuto);
-printf("--DBG2-- ComputePixmap() %g %g  %g %g  \n", fx1, fx2, fy1, fy2);
+// printf("--DBG2-- ComputePixmap() %g %g  %g %g  \n", fx1, fx2, fy1, fy2);
 xcurs = ycurs = -1;
 SetPixmap(pixm, xspxm, yspxm, true, xw1, yw1); 
Index: trunk/SophyaPI/PI/piimgtools.cc
===================================================================
--- trunk/SophyaPI/PI/piimgtools.cc	(revision 116)
+++ trunk/SophyaPI/PI/piimgtools.cc	(revision 117)
@@ -32,6 +32,6 @@
 spy = bsy/4;
 
-int wszx = 8*spx+3*bsx+1.5*bsy; 
-int wszy = 10*spy+7*bsy;
+int wszx = 8*spx+3*bsx+2*bsy; 
+int wszy = 10*spy+9*bsy;
 SetSize(wszx, wszy);
 
@@ -82,5 +82,5 @@
 mOpt[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 
-cpy += spy+bsy; 
+cpy += 2*spy+bsy; 
 cpx = bsx/2;
 mBut[0] = new PIButton(this, "Apply", 2500, bsx*1.5, bsy, cpx, cpy);
@@ -90,12 +90,12 @@
 mBut[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 
-int offy = cpy+bsy+spy*2;
+int offy = cpy+bsy+spy*3;
 printf("-DBG- PIImgLutWind()  SzX,Y= %d %d , ButPos= %d %d (off=%d)\n", wszx, wszy, cpx, cpy, offy);
 
-cpx = 5*spx+2.5*bsx;
+cpx = 6*spx+2.75*bsx;
 cpy = 2*spy;
-mSc[0] = new PIScale(this, "offset-lut", 2700, false, bsy*0.75, 4.5*bsy, cpx, cpy); 
+mSc[0] = new PIScale(this, "sc-offset-lut", 2700, false, bsy*0.75, 4.5*bsy, cpx, cpy); 
 cpx += 1.5*bsy;
-mSc[1] = new PIScale(this, "offset-lut", 2800, false, bsy*0.75, 4.5*bsy, cpx, cpy); 
+mSc[1] = new PIScale(this, "sc-dyn-lut", 2800, false, bsy*0.75, 4.5*bsy, cpx, cpy); 
 mSc[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 mSc[0]->SetMinMax(-50, 50);
@@ -106,5 +106,5 @@
 
 //  Option-Menu  Couleur/Zoom
-cpx = 2*spx;
+cpx = 3*spx;
 cpy = offy;
 mOptzc[0] = new PIOptMenu(this, "imglut-opt-3", 1.5*bsx, bsy, cpx, cpy);
@@ -120,6 +120,7 @@
 mOptzc[0]->AppendItem("Col16", 210);
 mOptzc[0]->SetValue(203);
-
-cpx += 1.5*bsx+2*spx;
+mOptzc[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+
+cpx += 1.5*bsx+3*spx;
 mOptzc[1] = new PIOptMenu(this, "imglut-opt-4", 1.5*bsx, bsy, cpx, cpy);
 mOptzc[1]->AppendItem("Agr. x10", 110);
@@ -139,4 +140,33 @@
 mOptzc[1]->AppendItem("Red. /10", 90);
 mOptzc[1]->SetValue(101);
+mOptzc[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+
+cpx = 2*spx;
+cpy += bsy+spy;
+mButsz[0] = new PIButton(this, "1x1", 3201,  bsx/2, bsy, cpx, cpy);
+mButsz[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+cpx += bsx/2+spx;
+mButsz[1] = new PIButton(this, "1x2", 3202,  bsx/2, bsy, cpx, cpy);
+mButsz[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+cpx += bsx/2+spx;
+mButsz[2] = new PIButton(this, "1x4", 3204,  bsx/2, bsy, cpx, cpy);
+mButsz[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+cpx += bsx/2+spx;
+mButsz[3] = new PIButton(this, "1/2", 3198,  bsx/2, bsy, cpx, cpy);
+mButsz[3]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+cpx += bsx/2+spx;
+mButsz[4] = new PIButton(this, "1/4", 3196,  bsx/2, bsy, cpx, cpy);
+mButsz[4]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+
+cpx = 2*spx;
+cpy += bsy+spy;
+mButcax[0] = new PIButton(this, "- X", 5201,  bsx/2, bsy, cpx, cpy);
+mButcax[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+cpx += bsx/2+spx;
+mButcax[1] = new PIButton(this, "- Y", 5202,  bsx/2, bsy, cpx, cpy);
+mButcax[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+cpx += bsx/2+spx;
+mButcax[2] = new PIButton(this, "X<>Y", 5203,  bsx/2, bsy, cpx, cpy);
+mButcax[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 
 curlutw = this;
@@ -158,4 +188,7 @@
   delete mOptzc[i];
   }
+for(int i=0; i<5; i++)  delete mButsz[i];
+for(int i=0; i<3; i++)  delete mButcax[i];
+
 }
 
@@ -191,23 +224,26 @@
 
 msg = UserMsg(msg);
+
+if (msg == 2600)  { this->Hide();  return; }
+PIImage* mpii = PIImage::CurrentPIImage();
+if (mpii == NULL)  return;
+
 switch (msg)
   {
-  case 2600:
-    this->Hide();
-    break;
   case 2500:
   case 2700 :
   case 2800 :
     {
-    if (PIImage::CurrentPIImage() == NULL)  return;
     min = atof(mText[0]->GetText().c_str());
     max = atof(mText[1]->GetText().c_str());
     if (msg == 2700) {
+      del = max-min;
       min += (float)mSc[0]->GetValue()/100*del;
       max += (float)mSc[0]->GetValue()/100*del;
     }
     if (msg == 2800) {
-      min -= (float)mSc[0]->GetValue()/100*del*0.5;
-      max += (float)mSc[0]->GetValue()/100*del*0.5;
+      del = max-min;
+      min -= (float)mSc[1]->GetValue()/100.*del*0.5;
+      max += (float)mSc[1]->GetValue()/100.*del*0.5;
     }
     if ( (msg == 2700) || (msg == 2800) ) {
@@ -228,4 +264,48 @@
     break;
 
+  case 3201 :
+  case 3202 :
+  case 3204 :
+  case 3198 :
+  case 3196 :
+    {
+    PIImage* pimg = PIImage::CurrentPIImage();
+    printf(" --DBG-- msg= %ld  pimg= %lx \n", (long)msg, (long)pimg);
+    int zm = msg-3200;
+    pimg->SetZoom(zm, false);
+    int sx, sy, snx, sny;
+    sx = pimg->XSize();
+    sy = pimg->YSize();
+    if (zm > 0)
+      {
+      snx = pimg->Image()->XSize()*zm;
+      sny = pimg->Image()->YSize()*zm;
+      }
+    else 
+      {
+      snx = pimg->Image()->XSize()/(-zm);
+      sny = pimg->Image()->YSize()/(-zm);
+      }
+    if ((snx != sx) || (sny != sy))
+      {
+      pimg->SetOffset(0, 0, false);
+      if (((PIContainer*)(pimg-Parent()))->NbChilds() == 1)  
+        ((PIContainer*)(pimg-Parent()))->SetSize(snx, sny);
+      }
+    else   pimg->SetOffset(0, 0);
+    
+    }
+    break;
+
+  case 5201 :
+    mpii->ChangeAxesConfiguration(true, false, false);
+    break;
+  case 5202 :
+    mpii->ChangeAxesConfiguration(false, true, false);
+    break;
+  case 5203 :
+    mpii->ChangeAxesConfiguration(false, false, true);
+    break;
+
   default:
 //    printf("PIImgLutWind::Process Msg %d received \n", (int)msg);
@@ -233,5 +313,4 @@
   }
 
-if (PIImage::CurrentPIImage() == NULL)  return;
 
 CMapId cmap[10] =  { CMAP_GREY32, CMAP_GREYINV32, CMAP_COLRJ32,
@@ -242,5 +321,5 @@
 if ((msg <= 110) && (msg >= 90))  // Zoom
   PIImage::CurrentPIImage()->SetZoom((int)(msg-100));
-else if ((msg > 200) && (msg < 206)) // Changement de couleur 
+else if ((msg > 200) && (msg < 211)) // Changement de couleur 
   PIImage::CurrentPIImage()->SetColMap(cmap[msg-201]);
 
Index: trunk/SophyaPI/PI/piwindowx.cc
===================================================================
--- trunk/SophyaPI/PI/piwindowx.cc	(revision 116)
+++ trunk/SophyaPI/PI/piwindowx.cc	(revision 117)
@@ -112,4 +112,5 @@
 {
 pwm->SetSize(sx, sy);
+PIWdgX::SetSize(sx, sy);
 return;
 }
@@ -119,4 +120,5 @@
 {
 pwm->SetPos(px, py);
+PIWdgX::SetPos(px, py);
 return;
 }
