diff options
| author | navewindre <boneyaard@gmail.com> | 2025-11-11 08:11:24 +0100 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2025-11-11 08:11:24 +0100 |
| commit | f5e29189f70c5c8532916504a1a22f8c586f6e73 (patch) | |
| tree | 9bf42144e608260527766e128268b380231ed95b /web/BlackWhiteResult.php | |
| parent | 6442494822d12c23cdd609031c4039d3309b64f6 (diff) | |
new web
Diffstat (limited to 'web/BlackWhiteResult.php')
| -rw-r--r-- | web/BlackWhiteResult.php | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/web/BlackWhiteResult.php b/web/BlackWhiteResult.php deleted file mode 100644 index f687ec6..0000000 --- a/web/BlackWhiteResult.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * The black / white or "ascii art" output processor. - * Transforms the input color values into ascii art characters. - * - * (c) 2016 Alex Schenkel - */ -namespace Img2Ascii; -require __DIR__ . '/result.php'; - -class BlackWhiteResult extends Result { - public $symbols = "@%#*+=-:. "; - - protected function gray2ascii($gray) { - $level = round($gray / 255.0 * (strlen($this->symbols)-1)); - return $this->symbols[(int)min($level,strlen($this->symbols)-1)]; - } - public function transformValue($value) { - return $this->gray2ascii($value); - } -} |
