|
| 1 | +# 🖼️ Canvas Editor Pro (Client-Side Image Filter App) |
| 2 | + |
| 3 | +This is a fast, secure, single-page web application built with **React** and the **HTML5 Canvas API**. It allows users to perform advanced color adjustments, apply filters, and crop/rotate images entirely in the browser, ensuring zero server-side data transfer and complete privacy. |
| 4 | + |
| 5 | +**🌐 Live Demo:** **[View the Editor Here!](https://simonnchong.github.io/image_editor/)** *(Click this link after your GitHub Pages status is active)* |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## 😘Example |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +## ✨ Key Features |
| 14 | + |
| 15 | +| Feature | Description | |
| 16 | +| :--- | :--- | |
| 17 | +| **100% Client-Side** | All image processing (filters, adjustments, rotation) is performed using the browser's resources. **No server, no API keys, and total data privacy.** | |
| 18 | +| **Interactive Crop Tool** | Click and drag directly on the image to define a custom cropping area, then apply to permanently resize the source image. | |
| 19 | +| **Image Rotation** | Instant 90° clockwise and counter-clockwise rotation with clear visual icons. | |
| 20 | +| **Real-Time Adjustments** | Fine-tune **Brightness**, **Contrast**, **Hue**, and **Saturation** using smooth sliders that apply changes immediately. | |
| 21 | +| **Reset Function** | Instantly reverts all filters, adjustments, crops, and rotations to the original uploaded image state. | |
| 22 | +| **Click-to-Zoom** | Click the final processed image to open a full-screen modal for detailed inspection before downloading. | |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## 🎨 Available Filters & Adjustments |
| 27 | + |
| 28 | +The editor combines hardware-accelerated **CSS filters** for color adjustments with custom **Convolution Kernels** for advanced pixel-level effects. |
| 29 | + |
| 30 | +### Color and Tone Adjustments |
| 31 | + |
| 32 | +| Adjustment | Range | Description | |
| 33 | +| :--- | :--- | :--- | |
| 34 | +| **Brightness** | -100 to 100 | Adjusts the overall lightness or darkness. | |
| 35 | +| **Contrast** | -100 to 100 | Controls the separation between dark and light tones. | |
| 36 | +| **Saturation** | -100 to 100 | Controls the intensity or purity of colors (vibrance). | |
| 37 | +| **Hue Rotate** | -180° to 180° | Shifts all colors on the color wheel. | |
| 38 | + |
| 39 | +### Preset Filter Styles |
| 40 | + |
| 41 | +| Category | Filter Name | Effect | |
| 42 | +| :--- | :--- | :--- | |
| 43 | +| **Basic** | **Grayscale / Invert** | Classic black and white / Flips all colors (negative). | |
| 44 | +| **Tonal** | **Sepia / Warm / Cool** | Applies a brown tint / Emphasizes warm tones / Emphasizes cool tones. | |
| 45 | +| **Film** | **Vintage / Polaroid / Technicolor** | Cinematic looks using combined adjustments for specific aesthetics. | |
| 46 | +| **Pixel** | **Pixelate** | Reduces image resolution dramatically for a chunky, retro effect. | |
| 47 | +| **Convolution**| **Sharpen / Blur / Gaussian Blur** | Enhances edges or softens image details using kernel matrices. | |
| 48 | +| **Geometry**| **Edge Detection / Emboss** | Detects and highlights hard lines / Gives a 3D stamped/relief appearance. | |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +## 🚀 Deployment and Setup |
| 53 | + |
| 54 | +This project uses **Create React App** conventions and is deployed using a **GitHub Action** which handles the entire build process automatically. |
| 55 | + |
| 56 | +### Prerequisites |
| 57 | + |
| 58 | +To run this project locally or contribute, you need: |
| 59 | + |
| 60 | + * **Node.js (LTS)** and **npm** installed. |
| 61 | + * **Git** for version control. |
| 62 | + |
| 63 | +### Local Setup and Running |
| 64 | + |
| 65 | +1. Clone the repository: |
| 66 | + ```bash |
| 67 | + git clone [https://github.com/simonnchong/image_editor.git](https://github.com/simonnchong/image_editor.git) |
| 68 | + cd image_editor |
| 69 | + ``` |
| 70 | +2. Install dependencies: |
| 71 | + ```bash |
| 72 | + npm install |
| 73 | + ``` |
| 74 | +3. Start the development server: |
| 75 | + ```bash |
| 76 | + npm start |
| 77 | + ``` |
| 78 | + The application will open in your browser at `http://localhost:3000`. |
| 79 | + |
| 80 | +### GitHub Pages Automated Deployment |
| 81 | + |
| 82 | +Since you deployed by uploading raw source files, the GitHub Action is critical. It performs the necessary steps that `npm run build` would normally do on your machine: |
| 83 | + |
| 84 | +1. The configuration in **`.github/workflows/deploy.yml`** watches for new commits on the `main` branch. |
| 85 | +2. The GitHub Action runs, automatically executing the build and optimization steps. |
| 86 | +3. The final, optimized website files are pushed to the special **`gh-pages`** branch. |
| 87 | +4. GitHub Pages is configured to serve the site directly from the **`gh-pages`** branch. |
0 commit comments