Skip to content

Commit acd0e8e

Browse files
committed
Prefer plain JPEG encoding over Tight
It compresses better because of its feature to drop repeating tables.
1 parent 607f86d commit acd0e8e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

common/rfb/EncodeManager.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,11 @@ void EncodeManager::prepareEncoders(bool allowLossy)
503503
solid = encoderHextile;
504504
}
505505

506+
// Prefer the plain JPEG encoder as it compresses better
507+
if ((fullColour == encoderTightJPEG) &&
508+
encoders[encoderJPEG]->isSupported())
509+
fullColour = encoderJPEG;
510+
506511
activeEncoders[encoderSolid] = solid;
507512
activeEncoders[encoderBitmap] = bitmap;
508513
activeEncoders[encoderBitmapRLE] = bitmapRLE;

0 commit comments

Comments
 (0)