PHP 实现的将图片转换为TXT,
程序员文章站
2022-05-16 16:31:51
...
PHP 实现的将图片转换为TXT,
PHP 实现的将图片转换为TXT
i!lI;:,\"^`'. "; function getimgchars($color_tran,$chars){ $length = strlen($chars); $alpha=$color_tran['alpha']; $r=$color_tran['red']; $g=$color_tran['green']; $b=$color_tran['blue']; $gray = intval(0.2126 * $r + 0.7152 * $g + 0.0722 * $b); if($gray==0){ return '.'; } if($gray'.$char."