diff --git a/common/rfb/ScaledPixelBuffer.cxx b/common/rfb/ScaledPixelBuffer.cxx
index 1be029d..35d5d3b 100644
--- a/common/rfb/ScaledPixelBuffer.cxx
+++ b/common/rfb/ScaledPixelBuffer.cxx
@@ -86,6 +86,19 @@
   }
 }
 
+void ScaledPixelBuffer::setScaleFilter(unsigned int scaleFilterID_) {
+  if (scaleFilterID == scaleFilterID_ || scaleFilterID_ > scaleFilterMaxNumber) return;
+
+  scaleFilterID = scaleFilterID_;
+  
+  if (src_width && src_height && scaled_width && scaled_height && pf.depth > 0) {
+    freeWeightTabs();
+    scaleFilters.makeWeightTabs(scaleFilterID, src_width, scaled_width, &xWeightTabs);
+    scaleFilters.makeWeightTabs(scaleFilterID, src_height, scaled_height, &yWeightTabs);
+    if (scale != 100) scaleRect(Rect(0, 0, src_width, src_height));
+  }
+}
+
 inline void ScaledPixelBuffer::rgbFromPixel(U32 p, int &r, int &g, int &b) {
   r = (((p >> pf.redShift  ) & pf.redMax  ) * 255 + pf.redMax  /2) / pf.redMax;
   g = (((p >> pf.greenShift) & pf.greenMax) * 255 + pf.greenMax/2) / pf.greenMax;
diff --git a/common/rfb/ScaledPixelBuffer.h b/common/rfb/ScaledPixelBuffer.h
index b41c59a..fbdba8c 100644
--- a/common/rfb/ScaledPixelBuffer.h
+++ b/common/rfb/ScaledPixelBuffer.h
@@ -77,6 +77,10 @@
     // Set the new scale, in percent
     virtual void setScale(int scale);
 
+    // Set/get the scale method
+    virtual void setScaleFilter(unsigned int scaleFilterID);
+    unsigned int getScaleFilterID() const { return scaleFilterID; }
+
     // Scale rect from the source image buffer to the destination buffer
     // using the current interpolation method
     virtual void scaleRect(const Rect& r);
diff --git a/win/vncviewer/DesktopWindow.cxx b/win/vncviewer/DesktopWindow.cxx
index 31018d1..7543707 100644
--- a/win/vncviewer/DesktopWindow.cxx
+++ b/win/vncviewer/DesktopWindow.cxx
@@ -1024,6 +1024,12 @@
   InvalidateRect(frameHandle, 0, FALSE);
 }
 
+void DesktopWindow::setDesktopScaleFilter(unsigned int scaleFilterID) { 
+  if (scaleFilterID == getDesktopScaleFilterID() || scaleFilterID > scaleFilterMaxNumber) return;
+  buffer->setScaleFilter(scaleFilterID);
+  InvalidateRect(frameHandle, 0, FALSE);
+}
+
 void DesktopWindow::convertCursorToBuffer() {
   if (memcmp(&(cursor.getPF()), &(buffer->getPF()), sizeof(PixelBuffer)) == 0) return;
   internalSetCursor = true;
diff --git a/win/vncviewer/DesktopWindow.h b/win/vncviewer/DesktopWindow.h
index 94f361d..4319b75 100644
--- a/win/vncviewer/DesktopWindow.h
+++ b/win/vncviewer/DesktopWindow.h
@@ -90,6 +90,8 @@
       bool isAutoScaling() const { return autoScaling; }
       void setDesktopScale(int scale);
       int  getDesktopScale() const { return buffer->getScale(); }
+      void setDesktopScaleFilter(unsigned int scaleFilterID);
+      unsigned int getDesktopScaleFilterID() const { return buffer->getScaleFilterID(); }
       void fitBufferToWindow(bool repaint = true);
       void printScale();
 
