Coder Social home page Coder Social logo

python-ascii_magic's People

Contributors

leandrobarone avatar leandrobaroneagrodreams avatar satyadahal avatar themrcodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

python-ascii_magic's Issues

Ascii HTML Mode

When trying to use ascii_magic.Modes.HTML, this is generated instead.

Code:
import ascii_magic
output = ascii_magic.from_image_file("dogedemo.png", mode=ascii_magic.Modes.HTML)
ascii_magic.to_terminal(output)

Result:
image

Brightness Correction

Since there is black/transparent area, the brightness, saturation and etc will look different (e.g. darker) from the original image. Any idea on the correction?

Linux support

Traceback (most recent call last):
File "convert.py", line 1, in
import ascii_magic
File "/home/gustavo/.local/lib/python3.8/site-packages/ascii_magic/init.py", line 2, in
from PIL import Image, ImageGrab
File "/usr/lib/python3/dist-packages/PIL/ImageGrab.py", line 26, in
raise ImportError("ImageGrab is macOS and Windows only")
ImportError: ImageGrab is macOS and Windows only

craiyon api no more working

hi,
I think the api adress you were using for craiyon is no more working:
When i tried to use your example I had a "JSONDecodeError: Expecting value: line 1 column 1 (char 0)" visibly because the request you use had no answer.
I take a look and the "https://api.craiyon.com/draw" you used is no more existing.
I tried to replace in your code by the old version of Craiyon (https://backend.craiyon.com/generate) and by the new one (https://api.craiyon.com/v3) without success.
But that does not change that i appreciate a lot your library :)

use set of chars instead of single char

The current behaviour of the optional char argument is to wrap the passed string in a list.

I don't why, but this actually limits the usefulness.

Simply removing the list, allows users to pass a string with the set of chars they wish to use.

Simply change
chars = [char] if char else CHARS_BY_DENSITY

To
chars = char if char else CHARS_BY_DENSITY

Strings are already iterable in python. This is also the current behaviour if char is None (CHARS_BY_DENSITY is just a string with all characters to be used).

Empty strings ('') evaluate to False, while strings with contents evaluate to True:

>>> test1 = ''
>>> test2 = '1'
>>> if test1: print(test1)
...
>>> if test2: print(test2)
...
1
>>>

Tag the source

It would be very helpful if you could tag releases as well. This would enable distributions who want to run your tests to fetch the package from GitHub instead of PyPI, where the tests are excluded.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.