Package: asciiarttools
Convert Image to ASCIIASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963 and ASCII compliant character sets with proprietary extended characters (beyond the 128 characters of standard 7-bit ASCII). The term is also loosely used to refer to text-based visual art in general. ASCII art can be created with any text editor and is often used with free-form languages. Most examples of ASCII art require a fixed-width font (non-proportional fonts, as on a traditional typewriter) such as Courier for presentation. Among the oldest known examples of ASCII art are the creations by computer-art pioneer Kenneth Knowlton from around 1966, who was working for Bell Labs at the time. “Studies in Perception I” by Ken Knowlton and Leon Harmon from 1966 shows some examples of their early ASCII art. ASCII art was invented, in large part, because early printers often lacked graphics ability and thus characters were used in place of graphic marks. Also, to mark divisions between different print jobs from different users, bulk printers often used ASCII art to print large banners, making the division easier to spot so that the results could be more easily separated by a computer operator or clerk. ASCII art was also used in an early e-mail when images could not be embedded. You can find out more about them.Source : Wiki.Our project is to convert input image from user and generate the corresponding ASCII output image.InstallationCreate apipenv-managed virtual environment and install the latest version of the package installed:pipenv install -i https://test.pypi.org/simple/ asciiarttoolsActivate the virtual environment:pipenv shellCreate a Python program file that imports the package and uses it, e.g.from asciiarttools import asciiarttoolsand then call the functions, for example:asciiarttools.convertImageToAsciiImage('cat1.jpg', 'output.png')FunctionsGenerate a plain ASCII image from input imageconvertImageToAscii(fileName, cols, scale, moreLevels, debug,outFile)Call convertImageToAscii function and pass the input file name, columns number, scale, level of grayscale, debug mode, and output file name. The default value is cols=80, scale=0.43, moreLevels=True,debug=False,outFile="out.txt".Generate a colored ASCII image from input imageconvertImageToAsciiImage(inputImage, outFile='output.png')Call convertImageToAsciiImage function and pass the input file and output file. The default is outFile='output.png'Adjust the brightness of a generated ASCII text imageadjustASCIIBrightness(art, value, moreLevels=True)Call adjustASCIIBrightness function and pass the input ASCII art file, magnitude in adjusting brightness, and level of grayscale. The default is moreLevels=True. The range for value is [-1,1], where value approaches 1 means increases the brightness, and value approaches -1 means decreases the brightness.Adjust the contrast of a generated ASCII text imageadjustASCIIContrast(art, value, moreLevels=True)Call adjustASCIIContrast function and pass the input ASCII art file, magnitude in adjusting contrast, and level of grayscale. The default is moreLevels=True.The range for value is [-1,1], where value approaches 1 means sharpen the contrast, and value approaches -1 means soften the contrast.How to ContributeClone the repositorygit clone https://github.com/software-students-fall2022/python-package-exercise-project-3-team-8.gitSet up the environmentpipenv shellInstall the dependenciespipenv install --devModify the codeTo build the package, run the following command:python -m buildTo test the package, run the following command:python -m pytestLink to Example Python ProgramExample ProgramLink to package's page on the PyPI websitehttps://test.pypi.org/project/asciiarttools/ContributorsAdler, DavidFan, WenniMa, MichaelZhang, Jiawei