mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
[sixel] seed initial TAM matrix #1445
This commit is contained in:
parent
670dcbdd08
commit
d813a66581
@ -146,10 +146,13 @@ extract_color_table(const uint32_t* data, int linesize, int begy, int begx, int
|
||||
for(int visx = begx ; visx < (begx + lenx) ; visx += 1){ // pixel column
|
||||
for(int sy = visy ; sy < (begy + leny) && sy < visy + 6 ; ++sy){ // offset within sprixel
|
||||
const uint32_t* rgb = (data + (linesize / 4 * sy) + visx);
|
||||
int txyidx = (sy / cdimy) * cols + (visx / cdimx);
|
||||
if(rgba_trans_p(ncpixel_a(*rgb))){
|
||||
if(tacache[txyidx] == SPRIXCELL_NORMAL){
|
||||
tacache[txyidx] = SPRIXCELL_CONTAINS_TRANS;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
int txyidx = (sy / cdimy) * cols + (visx / cdimx);
|
||||
if(tacache[txyidx] == SPRIXCELL_ANNIHILATED){
|
||||
//fprintf(stderr, "TRANS SKIP %d %d %d %d (cell: %d %d)\n", visy, visx, sy, txyidx, sy / cdimy, visx / cdimx);
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user