Commit 2cedf483 authored by Mike Tinglof's avatar Mike Tinglof

add last rect special encoding; fix tight fill subencoding color handling; fix...

add last rect special encoding; fix tight fill subencoding color handling; fix mono indexed rect handling
parent c514fd5e
...@@ -55,10 +55,12 @@ var that = {}, // Public API methods ...@@ -55,10 +55,12 @@ var that = {}, // Public API methods
['Cursor', -239 ], ['Cursor', -239 ],
// Psuedo-encoding settings // Psuedo-encoding settings
['JPEG_quality_lo', -32 ], //['JPEG_quality_lo', -32 ],
['JPEG_quality_med', -26 ],
//['JPEG_quality_hi', -23 ], //['JPEG_quality_hi', -23 ],
['compress_lo', -255 ] //['compress_lo', -255 ],
//['compress_hi', -247 ] ['compress_hi', -247 ],
['last_rect', -224 ]
], ],
encHandlers = {}, encHandlers = {},
...@@ -986,6 +988,11 @@ framebufferUpdate = function() { ...@@ -986,6 +988,11 @@ framebufferUpdate = function() {
'encoding': FBU.encoding, 'encoding': FBU.encoding,
'encodingName': encNames[FBU.encoding]}); 'encodingName': encNames[FBU.encoding]});
if (encNames[FBU.encoding] == 'last_rect') {
FBU.rects = 0;
break;
}
if (encNames[FBU.encoding]) { if (encNames[FBU.encoding]) {
// Debug: // Debug:
/* /*
...@@ -1354,13 +1361,13 @@ encHandlers.TIGHT = function display_tight() { ...@@ -1354,13 +1361,13 @@ encHandlers.TIGHT = function display_tight() {
dest[dp+1] = FBU.palette[sp+1]; dest[dp+1] = FBU.palette[sp+1];
dest[dp+2] = FBU.palette[sp+2]; dest[dp+2] = FBU.palette[sp+2];
} }
for (b = 7; b >= 8 - FBU.width % 8; b--) { }
var dp = (y*FBU.width + x*8 + 7-b) * 3; for (b = 7; b >= 8 - FBU.width % 8; b--) {
var sp = (data[y*w + x] >> b & 1) * 3; var dp = (y*FBU.width + x*8 + 7-b) * 3;
dest[dp ] = FBU.palette[sp ]; var sp = (data[y*w + x] >> b & 1) * 3;
dest[dp+1] = FBU.palette[sp+1]; dest[dp ] = FBU.palette[sp ];
dest[dp+2] = FBU.palette[sp+2]; dest[dp+1] = FBU.palette[sp+1];
} dest[dp+2] = FBU.palette[sp+2];
} }
} }
} else { } else {
...@@ -1456,7 +1463,7 @@ encHandlers.TIGHT = function display_tight() { ...@@ -1456,7 +1463,7 @@ encHandlers.TIGHT = function display_tight() {
'y': FBU.y, 'y': FBU.y,
'width': FBU.width, 'width': FBU.width,
'height': FBU.height, 'height': FBU.height,
'color': color}); 'color': [color[2], color[1], color[0]] });
break; break;
case "jpeg": case "jpeg":
clength = getCLength(ws.rQslice(1, 4)); clength = getCLength(ws.rQslice(1, 4));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment