Skip to main content

Picwish Photo Enhancer

Project description

PicWish API for Python 🎨✨

Enhance, generate, and process images without tokens, accounts, and watermarks, and enjoy unlimited usage!

[!WARNING] This tool uses scraping technology. Use of this tool is at your own risk.

Features

  • AI Text-to-Image Generation: Create images from text prompts with customizable themes, sizes, and quality.
  • Image Enhancement: Improve image quality without watermark.
  • Background Removal: Remove background from images.
  • OCR (Optical Character Recognition): Extract text from images with support for multiple languages and various output formats.
  • Image Expansion: Expand images with AI.

Installation

To get started, install the picwish package using pip:

pip install picwish

Quick Examples 🚀

1. AI Text-to-Image Generation 🤖

Generate images based on a text prompt with customizable settings:

import asyncio
from picwish import PicWish, T2ITheme, T2IQuality, T2ISize

async def main():
    picwish = PicWish()

    # Generate images from text prompt
    results = await picwish.text_to_image(
        prompt='A girl',
        theme=T2ITheme.ANIME,
        size=T2ISize.FHD_1_1,
        batch_size=4,
        quality=T2IQuality.HIGH
    )

    for result in results:
        await result.download(f'{result.id}.png')

asyncio.run(main())

2. Image Enhancement

Enhance the quality of an image without a watermark:

import asyncio
from picwish import PicWish

async def main():
    picwish = PicWish()

    # Enhance an image
    enhanced_image = await picwish.enhance('/path/to/input.jpg')
    await enhanced_image.download('enhanced_output.jpg')

asyncio.run(main())

3. Background Removal

Remove the background from an image:

import asyncio
from picwish import PicWish

async def main():
    picwish = PicWish()

    # Remove background from an image
    background_removed_image = await picwish.remove_background('/path/to/input.jpg')
    await background_removed_image.download('background_removed_output.png')

asyncio.run(main())

4. OCR (Optical Character Recognition)

Extract text from images with support for multiple languages and output formats:

import asyncio
from picwish import PicWish, OCRFormat

async def main():
    picwish = PicWish()
    ocr_result = await picwish.ocr(
        'input.jpg',
        format=OCRFormat.TXT
    )
    print(await ocr_result.text())

    # -----------------
    # Download as PNG
    ocr_result = await picwish.ocr(
        'input.jpg',
        format=OCRFormat.PDF
    )
    print(await ocr_result.download('result.pdf'))

asyncio.run(main())

5. Image Expansion

import asyncio
from picwish import PicWish

async def main():
    picwish = PicWish()

    # Generate images from text prompt
    results = await picwish.expand(
        'input.jpg',
        horizontal_expansion_ratio=1.5,
        vertical_expansion_ratio=1.5
    )

    for i, result in enumerate(results):
        await result.download(f'{i}.png')

asyncio.run(main())

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

picwish-0.6.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

picwish-0.6.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file picwish-0.6.0.tar.gz.

File metadata

  • Download URL: picwish-0.6.0.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for picwish-0.6.0.tar.gz
Algorithm Hash digest
SHA256 d482ee4c029df1b7d32ed4a8ece9406ddb3b19765c050b4e032306a6cf006e2b
MD5 735bbe719dae840670f5f08a168f1c7a
BLAKE2b-256 d07ae8b884677504fcfb9117eb8d745d48cb4a30b31a4b64117aa918bd7f7c84

See more details on using hashes here.

File details

Details for the file picwish-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: picwish-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for picwish-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9eec5387af8502b3960184543b480c8925d9f4059734b80ac89a636a534254b3
MD5 c1f58ee9a064e3bea8b24a23c2c3645e
BLAKE2b-256 f3cafe47721628a07cae044ed54a039ad2836f41b320b789672a934a8b948784

See more details on using hashes here.

Supported by

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