Skip to main content

Library for working with images based on Pillow

Project description

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 для полного списка.

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.4.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

workwithimage-0.0.4.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file workwithimage-0.0.4.1.tar.gz.

File metadata

  • Download URL: workwithimage-0.0.4.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.3.0

File hashes

Hashes for workwithimage-0.0.4.1.tar.gz
Algorithm Hash digest
SHA256 5d6ed2ace1cddff3803bfd2c75d9e1c28b63e23dc424db704aa6a4e152cf2666
MD5 0a227d634235c928b60077e07230af93
BLAKE2b-256 1fe77e68eea93fb5ac458b5635a49ba7ad3025a1fa32d67573c9f78924bb123e

See more details on using hashes here.

File details

Details for the file workwithimage-0.0.4.1-py3-none-any.whl.

File metadata

  • Download URL: workwithimage-0.0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.3.0

File hashes

Hashes for workwithimage-0.0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03aedf56d9509139316538ab5dd3052d8c31ea2cc1638bc14a73a8ac070bf0ea
MD5 7ab7333daa9fb7ffb2f92b29f21ec4d6
BLAKE2b-256 f696a8c5b54a0ce7c0f7189d3295f1b5831112a37c53dbe6584d0ece686f4871

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page