Index: python/plugins/GdalTools/__init__.py
===================================================================
--- python/plugins/GdalTools/__init__.py	(revision 14009)
+++ python/plugins/GdalTools/__init__.py	(working copy)
@@ -2,7 +2,7 @@
 /***************************************************************************
 Name			 	 : GdalTools
 Description          : Integrate gdal tools into qgis
-Date                 : 17/Sep/09 
+Date                 : 17/Sep/09
 copyright            : (C) 2009 by Lorenzo Masini and Giuseppe Sucameli (Faunalia)
 email                : lorenxo86@gmail.com - brush.tyler@gmail.com
  ***************************************************************************/
@@ -17,16 +17,16 @@
  ***************************************************************************/
  This script initializes the plugin, making it known to QGIS.
 """
-def name(): 
-  return "GdalTools" 
+def name():
+  return "GdalTools"
 def description():
   return "Integrate gdal tools into qgis"
-def version(): 
-  return "Version 1.2.0" 
+def version():
+  return "Version 1.2.1"
 def qgisMinimumVersion():
   return "1.0"
-def classFactory(iface): 
+def classFactory(iface):
   # load GdalTools class from file GdalTools
-  from GdalTools import GdalTools 
+  from GdalTools import GdalTools
   return GdalTools(iface)
 
Index: python/plugins/GdalTools/tools/doTranslate.py
===================================================================
--- python/plugins/GdalTools/tools/doTranslate.py	(revision 14009)
+++ python/plugins/GdalTools/tools/doTranslate.py	(working copy)
@@ -34,7 +34,12 @@
           (self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
           (self.targetSRSEdit, SIGNAL("textChanged(const QString &)"), self.targetSRSCheck),
           (self.selectTargetSRSButton, None, self.targetSRSCheck),
-          (self.creationOptionsTable, [SIGNAL("cellValueChanged(int, int)"), SIGNAL("rowRemoved()")], self.creationGroupBox)
+          (self.creationOptionsTable, [SIGNAL("cellValueChanged(int, int)"), SIGNAL("rowRemoved()")], self.creationGroupBox),
+          (self.outsizeSpin, SIGNAL("valueChanged (int)"), self.outsizeCheck),
+          (self.nodataSpin, SIGNAL("valueChanged (int)"), self.nodataCheck),
+          (self.sdsCheck, SIGNAL("stateChanged(int)")),
+          (self.srcwinEdit, SIGNAL("textChanged(const QString &)"), self.srcwinCheck),
+          (self.prjwinEdit, SIGNAL("textChanged(const QString &)"), self.prjwinCheck)
         ]
       )
 
@@ -160,6 +165,47 @@
         for opt in self.creationOptionsTable.options():
           arguments << "-co"
           arguments << opt
+      if self.outsizeCheck.isChecked():
+          if self.outsizeSpin.value() != 0 and self.outsizeSpin.value() != 100:
+              arguments << "-outsize"
+              arguments << str(self.outsizeSpin.value()) + '%'
+              arguments << str(self.outsizeSpin.value()) + '%'
+      if self.expandCheck.isChecked():
+          arguments << "-expand"
+          arguments << self.expandCombo.currentText()
+      if self.nodataCheck.isChecked():
+          arguments << "-a_nodata"
+          arguments << str(self.nodataSpin.value())
+      if self.sdsCheck.isChecked():
+          arguments << "-sds"
+      if self.srcwinCheck.isChecked() and not self.srcwinEdit.text().isEmpty():
+          #coordList = []
+          coordList = self.srcwinEdit.text().split(" ")
+          if len(coordList) == 4 and not coordList[3].isEmpty():
+              try:
+                  for x in coordList:
+                      test = int(x)
+              except ValueError:
+                  #print "Coordinates must be integer numbers."
+                  QMessageBox.critical(self,"Translate - srcwin", "Image coordinates (pixels) must be integer numbers.")
+              else:
+                  arguments << "-srcwin"
+                  for x in coordList:
+                      arguments << x
+      if self.prjwinCheck.isChecked() and not self.prjwinEdit.text().isEmpty():
+          #coordList = []
+          coordList = self.prjwinEdit.text().split(" ")
+          if len(coordList) == 4 and not coordList[3].isEmpty():
+              try:
+                  for x in coordList:
+                      test = float(x)
+              except ValueError:
+                  #print "Coordinates must be integer numbers."
+                  QMessageBox.critical(self,"Translate - prjwin", "Image coordinates (geographic) must be numbers.")
+              else:
+                  arguments << "-projwin"
+                  for x in coordList:
+                    arguments << x
       if self.isBatchEnabled():
         if self.formatCombo.currentIndex() != 0:
           arguments << "-of"
Index: python/plugins/GdalTools/tools/widgetTranslate.ui
===================================================================
--- python/plugins/GdalTools/tools/widgetTranslate.ui	(revision 14009)
+++ python/plugins/GdalTools/tools/widgetTranslate.ui	(working copy)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>335</width>
-    <height>259</height>
+    <width>358</width>
+    <height>436</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -39,7 +39,7 @@
        </property>
       </widget>
      </item>
-     <item row="0" column="1">
+     <item row="0" column="4">
       <layout class="QHBoxLayout" name="horizontalLayout_5">
        <item>
         <widget class="QComboBox" name="inputLayerCombo">
@@ -76,7 +76,7 @@
        </property>
       </widget>
      </item>
-     <item row="1" column="1">
+     <item row="1" column="4">
       <layout class="QHBoxLayout" name="horizontalLayout_2">
        <item>
         <widget class="QLineEdit" name="outputFileEdit">
@@ -104,7 +104,7 @@
        </property>
       </widget>
      </item>
-     <item row="2" column="1">
+     <item row="2" column="4">
       <widget class="QComboBox" name="formatCombo">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -121,7 +121,7 @@
        </property>
       </widget>
      </item>
-     <item row="3" column="1">
+     <item row="3" column="4">
       <layout class="QHBoxLayout" name="horizontalLayout">
        <item>
         <widget class="QLineEdit" name="targetSRSEdit">
@@ -142,6 +142,140 @@
        </item>
       </layout>
      </item>
+     <item row="4" column="0">
+      <widget class="QCheckBox" name="outsizeCheck">
+       <property name="maximumSize">
+        <size>
+         <width>100</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="toolTip">
+        <string>Percentage to resize image. This will change pixel size/image resolution accordingly: 25% will create an image with pixels 4x larger.</string>
+       </property>
+       <property name="text">
+        <string>Outsize (%):</string>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="4">
+      <widget class="QSpinBox" name="outsizeSpin">
+       <property name="maximumSize">
+        <size>
+         <width>75</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="toolTip">
+        <string>Percentage to resize image. This will change pixel size/image resolution accordingly: 25% will create an image with pixels 4x larger.</string>
+       </property>
+       <property name="maximum">
+        <number>1000</number>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="0">
+      <widget class="QCheckBox" name="nodataCheck">
+       <property name="toolTip">
+        <string>Assign a specified nodata value to output bands.</string>
+       </property>
+       <property name="text">
+        <string>No data:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="4">
+      <widget class="QSpinBox" name="nodataSpin">
+       <property name="maximumSize">
+        <size>
+         <width>75</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="toolTip">
+        <string>Assign a specified nodata value to output bands.</string>
+       </property>
+       <property name="maximum">
+        <number>255</number>
+       </property>
+      </widget>
+     </item>
+     <item row="8" column="0">
+      <widget class="QCheckBox" name="expandCheck">
+       <property name="statusTip">
+        <string>To expose a dataset with 1 band with a color table as a dataset with 3 (RGB) or 4 (RGBA) bands. Usefull for output drivers such as JPEG, JPEG2000, MrSID, ECW that don't support color indexed datasets. The 'gray' value (from GDAL 1.7.0) enables to expand a dataset with a color table that only contains gray levels to a gray indexed dataset.</string>
+       </property>
+       <property name="text">
+        <string>Expand:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="8" column="4">
+      <widget class="QComboBox" name="expandCombo">
+       <property name="toolTip">
+        <string>To expose a dataset with 1 band with a color table as a dataset with 3 (RGB) or 4 (RGBA) bands. Usefull for output drivers such as JPEG, JPEG2000, MrSID, ECW that don't support color indexed datasets. The 'gray' value (from GDAL 1.7.0) enables to expand a dataset with a color table that only contains gray levels to a gray indexed dataset.</string>
+       </property>
+       <item>
+        <property name="text">
+         <string>gray</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>rgb</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>rgba</string>
+        </property>
+       </item>
+      </widget>
+     </item>
+     <item row="9" column="0">
+      <widget class="QCheckBox" name="srcwinCheck">
+       <property name="toolTip">
+        <string>Selects a subwindow from the source image for copying based on pixel/line location. (Enter Xoff Yoff Xsize Ysize.)</string>
+       </property>
+       <property name="text">
+        <string>Srcwin:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="9" column="4">
+      <widget class="QLineEdit" name="srcwinEdit">
+       <property name="toolTip">
+        <string>Selects a subwindow from the source image for copying based on pixel/line location. (Enter Xoff Yoff Xsize Ysize.)</string>
+       </property>
+      </widget>
+     </item>
+     <item row="10" column="0">
+      <widget class="QCheckBox" name="prjwinCheck">
+       <property name="toolTip">
+        <string>Selects a subwindow from the source image for copying (like -srcwin) but with the corners given in georeferenced coordinates. (Enter ulx uly lrx lry.)</string>
+       </property>
+       <property name="text">
+        <string>Prjwin:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="10" column="4">
+      <widget class="QLineEdit" name="prjwinEdit">
+       <property name="toolTip">
+        <string>Selects a subwindow from the source image for copying (like -srcwin) but with the corners given in georeferenced coordinates. (Enter ulx uly lrx lry.)</string>
+       </property>
+      </widget>
+     </item>
+     <item row="11" column="0">
+      <widget class="QCheckBox" name="sdsCheck">
+       <property name="toolTip">
+        <string>Copy all subdatasets of this file to individual output files. Use with formats like HDF or OGDI that have subdatasets.</string>
+       </property>
+       <property name="text">
+        <string>Sds</string>
+       </property>
+      </widget>
+     </item>
     </layout>
    </item>
    <item>
