Skip to main content

Work With Image

English

This Python library based on Pillow, workwithimage, allows you to work with images. Features available in this version:

  • Converting an image into ASKII art
  • Image resolution adjustment
  • Changing the image format

Installation

pip install pillow
pip install workwithimage

Converting an image to ASKII art

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)

Image resolution adjustment

from workwithimage import resize_image

# Example usage
image_path = "your_image.jpg"
new_width = 800
new_height = 600
resized_image = resize_image(image_path, new_width, new_height)

Changing the image format

from workwithimage import convert_image_format

# Example usage
input_image_path = "your_image.jpg"
desired_output_format = "png"

output_image_path = convert_image_format(input_image_path, desired_output_format)

Supported Image Formats

  • JPEG
  • PNG
  • GIF
  • BMP
  • TIFF
  • WebP
  • ICO
  • and more

Important Note

  • The library supports various image formats; check Pillow documentation for the complete list.

Russian

Библиотека на Python на основе Pillow, workwithimage, позволяет работать с изображениями. Функции доступные в данной версии:

  • Перобразование изображения в ASKII-арт
  • Изменение разрешения изображения
  • Изменение разрешения изображения

Установка

pip install pillow
pip install workwithimage

Перобразование изображения в ASKII-арт

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)

Изменение разрешения изображения

from workwithimage import resize_image

# Пример использования
image_path = "ваше_изображение.jpg"
new_width = 800
new_height = 600
resized_image = resize_image(image_path, new_width, new_height)

Изменение формата изображения

from workwithimage import convert_image_format

# Пример использования
input_image_path = "ваше_изображение.jpg"
desired_output_format = "png"

output_image_path = convert_image_format(input_image_path, desired_output_format)

Поддерживаемые форматы изображений

  • JPEG
  • PNG
  • GIF
  • BMP
  • TIFF
  • WebP
  • ICO
  • и другие

Важное замечания

  • Библиотека поддерживает различные форматы изображений; проверьте документацию Pillow для полного списка.

Metadata

Release files for workwithimage 0.0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for workwithimage 0.0.4.1
File Size Uploaded Provenance Actions
workwithimage-0.0.4.1.tar.gz 2.3 kB Without provenance Details for workwithimage-0.0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for workwithimage 0.0.4.1
File Interpreter ABI Platform Actions
workwithimage-0.0.4.1-py3-none-any.whl Python 3 none any Details for workwithimage-0.0.4.1-py3-none-any.whl

Total release size: 5.0 kB

Release files / workwithimage-0.0.4.1.tar.gz

Download URL workwithimage-0.0.4.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5d6ed2ace1cddff3803bfd2c75d9e1c28b63e23dc424db704aa6a4e152cf2666
BLAKE2b-256 checksum
How to use checksums
1fe77e68eea93fb5ac458b5635a49ba7ad3025a1fa32d67573c9f78924bb123e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.3.0

Release files / workwithimage-0.0.4.1-py3-none-any.whl

Download URL workwithimage-0.0.4.1-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03aedf56d9509139316538ab5dd3052d8c31ea2cc1638bc14a73a8ac070bf0ea
BLAKE2b-256 checksum
How to use checksums
f696a8c5b54a0ce7c0f7189d3295f1b5831112a37c53dbe6584d0ece686f4871
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.3.0

Security for workwithimage 0.0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page