A tool that can be used to show photos in Terminal or Browser
- Convert photo to terminal readable colorful chars.
- Convert photo to browser readable (HTML) colorful chars.
- See examples to find out what is this. :')
write one of this following code in see the results.
terminal_photo.photo import Photo
obj = Photo(
path="./assets/Example.jpg", # path of your image
text=" ", # text that you want to show (if there is nothing use ' ')
size=(50, 180), # size of your image
front=False, # show color as char color or as background color
mode="run", # mode? run: show in print, html = save as html file, bash= save as bash file
)
obj.start()
terminal_photo.photo import Photo
obj = Photo(
path="./assets/Example.jpg", # path of your image
text="Mohammadreza", # text that you want to show (if there is nothing use ' ')
size=(50, 180), # size of your image
front=True, # show color as char color or as background color
mode="run", # mode? run: show in print, html = save as html file, bash= save as bash file
)
obj.start()
terminal_photo.photo import Photo
obj = Photo(
path="./assets/Example.jpg", # path of your image
text=" ", # text that you want to show (if there is nothing use ' ')
size=(50, 180), # size of your image
front=False, # show color as char color or as background color
mode="html", # mode? run: show in print, html = save as html file, bash= save as bash file
)
obj.start('index.html') # enter the name and path of output while using html or bash mode
terminal_photo.photo import Photo
obj = Photo(
path="./assets/Example.jpg", # path of your image
text="Mohammadreza", # text that you want to show (if there is nothing use ' ')
size=(50, 180), # size of your image
front=False, # show color as char color or as background color
mode="html", # mode? run: show in print, html = save as html file, bash= save as bash file
)
obj.start('index.html') # enter the name and path of output while using html or bash mode