-
Project description
Work With Image
English
This Python library, workwithimage
, enables converting images into ASCII art with uniform character width. It utilizes the Pillow library for image processing.
Installation
pip install workwithimage
Usage
from workwithimage import convert_to_ascii
# Example usage
image_path = "your_image.jpg"
columns = 150
ascii_image = convert_to_ascii(image_path, columns)
print(ascii_image)
# Save to file
with open("output.txt", "w") as file:
file.write(ascii_image)
Supported Image Formats
- JPEG
- PNG
- GIF
- BMP
- TIFF
- WebP
- ICO
- and more
Important Notes
- The library supports various image formats; check Pillow documentation for the complete list.
- Adjust the
columns
parameter for desired output width.
Russian
Эта библиотека на Python, workwithimage
, позволяет преобразовывать изображения в ASCII-арт с символами одинаковой длины, используя библиотеку Pillow для обработки изображений.
Установка
pip install workwithimage
Использование
from workwithimage import convert_to_ascii
# Пример использования
image_path = "ваше_изображение.jpg"
columns = 150
ascii_image = convert_to_ascii(image_path, columns)
print(ascii_image)
# Сохранение в файл
with open("output.txt", "w") as file:
file.write(ascii_image)
Поддерживаемые форматы изображений
- JPEG
- PNG
- GIF
- BMP
- TIFF
- WebP
- ICO
- и другие
Важные замечания
- Библиотека поддерживает различные форматы изображений; проверьте документацию Pillow для полного списка.
- Измените параметр
columns
для получения нужной ширины вывода.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
workwithimage-0.0.2.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for workwithimage-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47987040f02ab4f385a54d79ae215213c844a0b6971e7faaaac304eaa4b3eb88 |
|
MD5 | 8c0fbdd10ab15ec3d750d24ba6b541c1 |
|
BLAKE2b-256 | 45003ab061b5b9bc4f2c04f55f29482a9feb1f26594682c87f24b1e790c6e708 |