# StrImg **Repository Path**: dxtan90/str-img ## Basic Information - **Project Name**: StrImg - **Description**: 图片生成字符画 - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-12-01 - **Last Updated**: 2024-05-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: 工具 ## README # 字符画工具 ## 0.介绍 ### 两种功能。 * 将图片灰度处理输出图片。 * 将图片转为txt字符画。 ## 1.使用方法 ### 代码使用 ``` java public interface GrayMethod { int getGrey(int red,int green,int blue String getName( } /** * @param inputPath: 输入文件路径 * @param outPath: 输出文件夹路径 * @return: void * @author: shijunhao * @date: 2021/11/15 15:17 * @description: 灰度处理方式 */ public void grayOrder(String inputPath, String outPath) {...} /** * @param inputPath: 输入文件路径 * @param outPath: 输出文件路径 * @param grayMethod: 灰度处理方法 * @param strMethod: 图片行转字符处理方式 * @return: void * @author: wxt.shijunhao * @date: 2021/11/15 16:49 * @description: 字符画处理方式 */ public void strOrder(String inputPath, String outPath, String grayMethod,String strMethod){...} ``` ### 命令行jar ``` shell C*************>java -jar strImg.jar help ------------------------------------------------------ |------------------字符画工具指令帮助------------------- ------------------------------------------------------ | 1:lg [outputPath] | 1.1: 此功能为将一个图片的各种灰度处理图片输出到 | outputPath生成一个对应图片名称的目录中 | 1.2: 默认路径为工作目录 ------------------------------------------------------ | 2:ts [strMethod] [grayMethod] [outputPath] | 2.1: 此功能为将输入图片的字符图片输出到输出目录中 | 2.2: 默认路径为工作目录 | 2.3: strMethod 为图片每行转字符串每行处理 | 2.3.1: MAX:取最大值提高步长,windows记事本一行最长为1024 | 2.3.2: ZIP:图片压缩法,将图片的像素缩小到511宽度 | 2.3.3: 默认为图片压缩法,此方法更为均匀,但清晰度有损 | 2.4: grayMethod 为灰度处理方式 | 2.4.1: DEAL_AVERAGE:平均值法 | 2.4.2: DEAL_BIGGEST:最大值法 | 2.4.3: DEAL_SMALLEST:最小值法 | 2.4.4: DEAL_POWER:权值法 | 2.4.5: 默认为平均值取灰度 ------------------------------------------------------ | 3:help : 指令帮助 ------------------------------------------------------ ```