Skip to content

Commit

Permalink
Disable caching as it appears to degrade quality.
Browse files Browse the repository at this point in the history
  • Loading branch information
wbrown committed Aug 5, 2024
1 parent 33e4479 commit 7c3a21e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions img2ansi.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,11 @@ func findBestBlockRepresentation(block [4]RGB, isEdge bool) (rune, RGB, RGB) {
})
}
// Add the result to the lookup table
lookupTable[paletteBlock] = lookupEntry{
rune: bestRune,
fg: bestFG,
bg: bestBG,
}
//lookupTable[paletteBlock] = lookupEntry{
// rune: bestRune,
// fg: bestFG,
// bg: bestBG,
//}
return bestRune, bestFG, bestBG
}

Expand Down Expand Up @@ -387,11 +387,11 @@ func findBestBlockRepresentation(block [4]RGB, isEdge bool) (rune, RGB, RGB) {
}

// Add the result to the lookup table
lookupTable[paletteBlock] = lookupEntry{
rune: bestRune,
fg: bestFG,
bg: bestBG,
}
//lookupTable[paletteBlock] = lookupEntry{
// rune: bestRune,
// fg: bestFG,
// bg: bestBG,
//}

return bestRune, bestFG, bestBG
}
Expand Down Expand Up @@ -567,7 +567,7 @@ func main() {
maxChars := flag.Int("maxchars", 1048576, "Maximum number of characters in the output")
outputFile := flag.String("output", "", "Path to save the output (if not specified, prints to stdout)")
quantization := flag.Int("quantization", 256, "Quantization factor")
scaleFactor := flag.Float64("scale", 3.0, "Scale factor for the output image")
scaleFactor := flag.Float64("scale", 2.0, "Scale factor for the output image")
eightBit := flag.Bool("8bit", false, "Use 8-bit ANSI colors (256 colors)")
printTable := flag.Bool("table", false, "Print ANSI color table")
kdSearchDepth := flag.Int("kdsearch", 40, "Number of nearest neighbors to search in KD-tree, 0 to disable")
Expand Down

0 comments on commit 7c3a21e

Please sign in to comment.