diff options
author | Constantin Kaplinsky <const@tightvnc.com> | 2007-10-10 10:03:06 +0000 |
---|---|---|
committer | Constantin Kaplinsky <const@tightvnc.com> | 2007-10-10 10:03:06 +0000 |
commit | c257370bef6c70176eef01e47edc3e59080fcef4 (patch) | |
tree | f6d90cf426e09061bfb0085a0d1f5f52644077c8 /common/rfb/IrixDMJpegCompressor.cxx | |
parent | 9964c782b6e45b2112da8072c66f0aa2ee1243dd (diff) | |
download | tigervnc-c257370bef6c70176eef01e47edc3e59080fcef4.tar.gz tigervnc-c257370bef6c70176eef01e47edc3e59080fcef4.zip |
Changes in mapping of JPEG quality levels. Minor code cleanups.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2360 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/IrixDMJpegCompressor.cxx')
-rw-r--r-- | common/rfb/IrixDMJpegCompressor.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/rfb/IrixDMJpegCompressor.cxx b/common/rfb/IrixDMJpegCompressor.cxx index dda059f8..6e155ec1 100644 --- a/common/rfb/IrixDMJpegCompressor.cxx +++ b/common/rfb/IrixDMJpegCompressor.cxx @@ -35,7 +35,7 @@ IrixDMJpegCompressor::~IrixDMJpegCompressor() } // -// Set JPEG quality level (0..100) +// Set JPEG quality level (1..100) // // FIXME: Call m_ic.setImageQuality() when necessary. // @@ -43,10 +43,11 @@ IrixDMJpegCompressor::~IrixDMJpegCompressor() void IrixDMJpegCompressor::setQuality(int level) { - if (level < 0) - level = 0; - if (level > 100) + if (level < 1) { + level = 1; + } else if (level > 100) { level = 100; + } m_quality = level; } |