A powerful, full-featured image editing application powered by AI and traditional image processing techniques. Built with React, FastAPI, and OpenCV.
- AI Edit - Natural language image editing using Google Gemini AI
- Remove Background - Intelligent background removal with AI
- Generative Fill - AI-powered inpainting and content generation
- Adjust - Brightness, contrast, saturation, and sharpness controls
- Filters - Blur, sharpen, grayscale, sepia, vintage, edge detection, emboss (powered by OpenCV)
- Transform - Rotate (90°, 180°, 270°) and flip (horizontal/vertical)
- Text - Add customizable text with font, size, color, and background options
- Crop - Interactive crop tool with visual selection
- Convert - Format conversion (PNG, JPG, WebP, BMP, TIFF, GIF, ICO)
- Compress - Image compression with quality control and size comparison
- Python 3.8+
- Node.js 16+
- npm or yarn
- Google API Key (for AI features)
git clone <repository-url>
cd ai-image-editorcd backend
pip install -r requirements.txtCreate a .env file in the backend directory:
GOOGLE_API_KEY=your_google_api_key_hereGet your Google API Key from Google AI Studio
python main.pyThe backend will start on http://localhost:8000
cd frontend
npm installnpm run devThe frontend will start on http://localhost:5173
Open your browser and navigate to:
http://localhost:5173
- Upload an Image - Click the upload area or drag & drop an image
- Select a Feature - Choose from AI Features or Basic Features tabs
- Apply Edits - Configure settings and click Apply
- Download - Download your edited image
- AI Edit: Describe what you want to change (e.g., "Make the sky more dramatic")
- Remove Background: Automatically removes the background, making it transparent
- Generative Fill: Describe areas to fill or modify (e.g., "Fill empty space with trees")
- Adjust: Use sliders to modify brightness, contrast, saturation, and sharpness
- Filters: Apply various filters with one click (all powered by OpenCV)
- Transform: Rotate or flip your image in any direction
- Text: Add text with custom fonts, sizes, colors, and backgrounds
- Crop: Click and drag on the image to select the crop area
- Convert: Convert between different image formats
- Compress: Reduce file size while maintaining quality
Use the Undo button to revert to the previous state. You can undo multiple times to go back through your edit history.
ai-image-editor/
├── backend/
│ ├── main.py # FastAPI application
│ ├── requirements.txt # Python dependencies
│ └── .env # Environment variables
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── ImageEditor.jsx
│ │ │ ├── ImageUploader.jsx
│ │ │ ├── CanvasEditor.jsx
│ │ │ └── *.css
│ │ ├── App.jsx
│ │ └── main.jsx
│ ├── package.json
│ └── vite.config.js
├── README.md
└── .gitignore
- React - UI framework
- Vite - Build tool
- Axios - HTTP client
- Lucide React - Icons
- FastAPI - Web framework
- OpenCV (cv2) - Image processing
- Pillow (PIL) - Image manipulation
- Google Gemini AI - AI features
- Verify your Google API Key is correct
- Check your internet connection
- Ensure you have sufficient API quota
POST /api/upload- Upload imagePOST /api/crop- Crop imagePOST /api/add-text- Add text to imagePOST /api/adjust- Adjust brightness, contrast, saturation, sharpnessPOST /api/filter- Apply filters (OpenCV)POST /api/rotate- Rotate imagePOST /api/flip- Flip imagePOST /api/compress- Compress imagePOST /api/convert- Convert image format
POST /api/ai-edit- AI-powered editingPOST /api/remove-background- Remove backgroundPOST /api/generative-fill- Generative fill
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for AI features
- OpenCV for image processing
- React and FastAPI communities
For issues, questions, or suggestions, please open an issue on GitHub.
Happy Editing! 🎨



