Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose Art - Python #2

Merged
merged 8 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ASCII-ART-using-Python

ASCII, in full American Standard Code for Information Interchange, a standard data-encoding format for electronic communication between computers.
ASCII assigns standard numeric values to letters, numerals, punctuation marks, and other characters used in computers.

Using the ASCII_MAGIC Python library, we can create ASCII code for any image format, which leads to many masterpieces of art.
ascii_magic library is one of the most used libraries for ASCII art, including this project.

Completed #1 Ascii_Art.

There are three image files present in Folder Task 1:
1. Hacktoberfes.jpg
2. Pikachu.jpg
3. TechVine.jpg

The python file chooseArt.py lets you choose any of the pictures mentioned above and take user input.
After the user input is given, the python code converts the image into any code base ASCII Art.
Binary file added Task 1/Hacktoberfest.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Task 1/Pikachu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Task 1/TechVine.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions Task 1/chooseArt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import ascii_magic

Hacktober = ascii_magic.from_image_file("Hacktoberfest.jpg", columns = 200, char='#')
Pikachu = ascii_magic.from_image_file("Pikachu.jpg", columns = 200, char='#')
TechVine = ascii_magic.from_image_file("TechVine.jpg", columns = 200, char='#')

inp = int(input('''Choose an ASCII - ART
[1] Hacktober
[2] Pikachu
[3] Tech Vine : '''))

if inp == 1:
x = Hacktober
elif inp == 2:
x = Pikachu
elif inp == 3:
x = TechVine
else:
print("Invalid Input")



ascii_magic.to_terminal(x)