mirror of
https://gitlab.com/AutumnMeowMeow/jexer
synced 2024-09-19 11:50:19 -06:00
#99 limit size of frcolor match cache
This commit is contained in:
parent
60c249e6fe
commit
fdd2a216ce
1 changed files with 4 additions and 2 deletions
|
@ -1319,8 +1319,10 @@ public class HQSixelEncoder implements SixelEncoder {
|
|||
// be deemed in the same neighborhood.
|
||||
pcaThreshold = ((pcaColors.get(idx - 1).firstPca - pcaColors.get(0).firstPca) / idx) * 8.0;
|
||||
|
||||
// Allow up the last 8192 colors to be re-used.
|
||||
recentColorMatch = new ColorMatchCache(8192);
|
||||
// Allow up the last 8192 colors to be re-used, or 10% of the
|
||||
// image size.
|
||||
recentColorMatch = new ColorMatchCache(Math.min(
|
||||
sixelImageWidth * sixelImageHeight / 10, 8192));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue