--- title: Image Rotator emoji: 🔄 colorFrom: indigo colorTo: purple sdk: gradio sdk_version: 6.14.0 app_file: app.py pinned: false --- # ImageRotate This repository contains experimental scripts and applications. ## 🔄 Image Rotator A beautiful, premium Gradio application for rotating images by standard steps or custom angles. It supports uploading files, drag-and-drop, and pasting images directly from the clipboard. ### Features - **Flexible Inputs**: Drag and drop, file browser, or paste directly from clipboard (Ctrl+V). - **One-Click Presets**: Quick actions to rotate `90° CCW`, `90° CW`, or `180°`, plus a quick `Reset` button. - **Custom Precision**: Interactive slider to rotate by any angle between `-360°` and `360°`. - **Advanced Canvas Settings**: - **Expand Canvas**: Option to expand the output canvas to fit the rotated image or clip it to the original size. - **Custom Background Fills**: Select a transparent background (transparency layer, requires PNG export), black, white, or input a custom hex color code. - **EXIF Correction**: Automatically respects camera orientation tags so images are rendered correctly. - **Modern UI**: Designed using custom CSS glassmorphism, gradient banners, and a clean, responsive layout. --- ### How to Run the App This project uses `uv` for package and environment management. Follow these guidelines to run the application: #### 1. Setup Environment & Install Dependencies First, ensure that `uv` is installed, then synchronize the environment. ```bash # Sync dependencies from pyproject.toml uv sync ``` *Note: If you are setting up the project from scratch, you can also install the dependencies manually using:* ```bash uv add gradio pillow ``` #### 2. Launch the Application Run the Gradio server using `uv run`. We recommend using `-u` (unbuffered) so logs flush to console immediately: ```bash uv run python -u app.py ``` Once running, open your web browser and navigate to: 👉 **[http://127.0.0.1:7860](http://127.0.0.1:7860)**