This project provides a simple web application that allows users to upload an image and automatically remove its background. It utilizes the remove.bg API for processing images, making it easy for users to obtain images with transparent backgrounds.
- Drag and Drop Interface: Users can drag and drop images directly onto the web page.
- File Selection: Alternatively, users can select images using a file chooser dialog.
- Before and After Comparison: View the original image alongside the processed image with the background removed.
- Download Option: Users can download the processed image with a transparent background.
- Reset Functionality: Clear the images and reset the interface for a new upload.
- HTML: For structuring the web application.
- CSS: For styling the application and ensuring a responsive design.
- JavaScript: For handling user interactions, file uploads, and API calls.
- remove.bg API: For processing images and removing backgrounds.
-
Upload an Image:
- Drag and drop an image onto the designated area or click the "Choose File" button to select an image from your computer.
-
View Results:
- The original image will appear on the left, and the processed image (with the background removed) will appear on the right.
-
Download the Image:
- Once the background has been removed, click the "Download Image" button to save the processed image to your device.
-
Reset:
- If you want to upload a new image, click the "Reset" button to clear the current images and start over.
The application uses the remove.bg API, which requires an API key for usage. Replace the placeholder API key in the script.js
file with your own:
headers: {
'X-Api-Key': 'YOUR_API_KEY_HERE',
}
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.
This project is licensed under the MIT License.
Created by DavenArchives