add last rect special encoding; fix tight fill subencoding color handling; fix mono indexed rect handling
This commit is contained in:
parent
c514fd5e1c
commit
2cedf48397
|
@ -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() {
|
||||||
'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,6 +1361,7 @@ 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--) {
|
for (b = 7; b >= 8 - FBU.width % 8; b--) {
|
||||||
var dp = (y*FBU.width + x*8 + 7-b) * 3;
|
var dp = (y*FBU.width + x*8 + 7-b) * 3;
|
||||||
var sp = (data[y*w + x] >> b & 1) * 3;
|
var sp = (data[y*w + x] >> b & 1) * 3;
|
||||||
|
@ -1362,7 +1370,6 @@ encHandlers.TIGHT = function display_tight() {
|
||||||
dest[dp+2] = FBU.palette[sp+2];
|
dest[dp+2] = FBU.palette[sp+2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
for (y = 0; y < FBU.height; y++) {
|
for (y = 0; y < FBU.height; y++) {
|
||||||
for (x = 0; x < FBU.width; x++) {
|
for (x = 0; x < FBU.width; x++) {
|
||||||
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue