Metadata-Version: 2.4
Name: nano-banana-2-ai
Version: 1773626.802.80
Summary: High-quality integration for https://nanaimg.app/
Home-page: https://nanaimg.app/
Author: SuperMaker
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# nano-banana-2-ai

A Python library facilitating automated interaction with the nano-banana-2-ai service, streamlining image processing and analysis workflows. This package provides a convenient interface for showcasing nano-banana-2-ai's capabilities and integrating with the https://nanaimg.app/ platform.

## Installation

Install the `nano-banana-2-ai` package using pip:
bash
pip install nano-banana-2-ai

## Basic Usage

This section demonstrates common use cases for the `nano-banana-2-ai` library.  Ensure you have the necessary API key configured (see documentation on https://nanaimg.app/ for details on obtaining and configuring your key).

**1. Image Enhancement:**

Enhance the quality of an image to improve its visual clarity.
python
from nano_banana_2_ai import NanoBananaAI

nb = NanoBananaAI(api_key="YOUR_API_KEY") # Replace with your actual API key

input_image_path = "path/to/your/image.jpg"
output_image_path = "path/to/enhanced/image.jpg"

try:
    nb.enhance_image(input_image_path, output_image_path)
    print(f"Image enhancement successful. Saved to: {output_image_path}")
except Exception as e:
    print(f"An error occurred: {e}")

**2. Object Detection:**

Identify and locate objects within an image.
python
from nano_banana_2_ai import NanoBananaAI

nb = NanoBananaAI(api_key="YOUR_API_KEY") # Replace with your actual API key

image_path = "path/to/your/image.jpg"
try:
    detections = nb.detect_objects(image_path)
    print("Object Detections:")
    for detection in detections:
        print(f"  - Label: {detection['label']}, Confidence: {detection['confidence']}, Bounding Box: {detection['bounding_box']}")
except Exception as e:
    print(f"An error occurred: {e}")

**3. Image Transformation (Grayscale Conversion):**

Convert a color image to grayscale.
python
from nano_banana_2_ai import NanoBananaAI

nb = NanoBananaAI(api_key="YOUR_API_KEY") # Replace with your actual API key

input_image_path = "path/to/your/image.jpg"
output_image_path = "path/to/grayscale/image.jpg"

try:
    nb.convert_to_grayscale(input_image_path, output_image_path)
    print(f"Image converted to grayscale. Saved to: {output_image_path}")
except Exception as e:
    print(f"An error occurred: {e}")

**4. Image Resizing:**

Resize an image to specific dimensions.
python
from nano_banana_2_ai import NanoBananaAI

nb = NanoBananaAI(api_key="YOUR_API_KEY") # Replace with your actual API key

input_image_path = "path/to/your/image.jpg"
output_image_path = "path/to/resized/image.jpg"
width = 500
height = 300

try:
    nb.resize_image(input_image_path, output_image_path, width, height)
    print(f"Image resized. Saved to: {output_image_path}")
except Exception as e:
    print(f"An error occurred: {e}")

## Feature List

*   **Image Enhancement:** Improve image quality with automated algorithms.
*   **Object Detection:** Identify and locate objects within images.
*   **Image Transformation:** Support for various image transformations, including grayscale conversion and resizing.
*   **Easy Integration:** Simple API calls for seamless integration with your Python projects.
*   **Error Handling:** Robust error handling to gracefully manage potential issues.
*   **API Key Authentication:** Secure authentication using API keys.
*   **Well-Documented:** Comprehensive documentation for all functions and features.

## License

MIT License

This project is a gateway to the nano-banana-2-ai ecosystem. For advanced features and full capabilities, please visit: https://nanaimg.app/
