summaryrefslogtreecommitdiff
path: root/web/BlackWhiteResult.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/BlackWhiteResult.php')
-rw-r--r--web/BlackWhiteResult.php21
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);
- }
-}