{"id":51094660,"url":"https://github.com/vicajilau/unback","last_synced_at":"2026-06-24T05:02:44.884Z","repository":{"id":365460689,"uuid":"1272185711","full_name":"vicajilau/unback","owner":"vicajilau","description":"An open-source application built with Flutter to remove image backgrounds quickly and easily.","archived":false,"fork":false,"pushed_at":"2026-06-20T09:11:07.000Z","size":18452,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T11:10:19.896Z","etag":null,"topics":["background-eraser","background-removal","cross-platform","dart","flutter","flutter-app","image-processing","open-source","tool"],"latest_commit_sha":null,"homepage":"https://vicajilau.github.io/unback/","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vicajilau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-17T11:18:46.000Z","updated_at":"2026-06-20T09:11:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vicajilau/unback","commit_stats":null,"previous_names":["vicajilau/background-remover","vicajilau/unback"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/vicajilau/unback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicajilau%2Funback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicajilau%2Funback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicajilau%2Funback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicajilau%2Funback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vicajilau","download_url":"https://codeload.github.com/vicajilau/unback/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicajilau%2Funback/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34717769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background-eraser","background-removal","cross-platform","dart","flutter","flutter-app","image-processing","open-source","tool"],"created_at":"2026-06-24T05:02:44.062Z","updated_at":"2026-06-24T05:02:44.874Z","avatar_url":"https://github.com/vicajilau.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unback: Background Remover\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/assets/logo_transparent.png\" alt=\"Background Remover Logo\" width=\"160\"\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"https://github.com/vicajilau/unback/actions/workflows/ci.yaml/badge.svg\" alt=\"CI/CD Status\"\u003e\n\u003c/p\u003e\n\nThe open-source companion for all your image processing needs in Flutter. \n\nBackground Remover automatically extracts subjects and generates transparent backgrounds. Instead of relying on restrictive paid tools, you can process your images directly using this robust, cross-platform application.\n\n---\n\n## 🚀 Key Features\n\n* **Zero-Cost Processing:** Completely free and open-source. No subscriptions or hidden API limits.\n* **Instant Background Removal:** Select an image and let the application cleanly separate the foreground subject from the background.\n* **Cross-Platform Support:** Fully developed in Flutter, ensuring a smooth, native-like experience across different operating systems.\n* **Privacy First:** Process images securely without necessarily sending your personal photos to third-party cloud servers.\n\n---\n\n## ⚙️ How It Works \u0026 Architecture\n\nTo achieve smooth, high-performance background removal without freezing the user interface (UI), the application implements a **dual-architecture image processing pipeline** using conditional compilation:\n\n```mermaid\ngraph TD\n    A[Image Input] --\u003e B{Platform?}\n    B -- Native (iOS/Android/Desktop) --\u003e C[Isolate-based Processor]\n    C --\u003e C1[\"compute() with package:image\"]\n    C1 --\u003e C2[Background Isolate Thread]\n    C2 --\u003e C3[RGB Distance + Smooth Gradient Filter]\n    C3 --\u003e F[Processed PNG bytes]\n    \n    B -- Web --\u003e D[Browser Canvas Processor]\n    D --\u003e D1[\"package:web + JS Interop\"]\n    D1 --\u003e D2[\"Browser GPU/C++ Decoding (ImageElement)\"]\n    D2 --\u003e D3[In-place Typed Array Pixel Processing]\n    D3 --\u003e D4[\"canvas.toBlob() (Async Browser compression)\"]\n    D4 --\u003e F\n```\n\n### 📱 Native Platforms (iOS, Android \u0026 Desktop)\nFor native platforms, CPU-bound image operations are executed on background threads:\n* **Background Isolates**: The app uses Flutter's `compute` utility to decode the image and apply the background removal filters on a separate native thread (Isolate).\n* **Pure Dart Processing**: The pixels are evaluated and modified using the `image` package in pure Dart, ensuring consistent result accuracy across all operating systems.\n* **Responsive UI**: Because the heavy computing is offloaded from the main UI thread, animations and transitions remain completely fluid (60fps/120fps).\n\n### 🌐 Web Platform\nSince browser JavaScript runs in a single-threaded environment, standard `compute` runs synchronously on the main thread, which can easily freeze the browser UI. To solve this, a specialized web processor is loaded conditionally:\n* **Native Browser Decoder**: We decode the uploaded image using the browser's hardware-accelerated `HTMLImageElement` in milliseconds.\n* **Canvas Pixel Manipulation**: The decoded pixels are drawn to an off-screen `HTMLCanvasElement`. The app processes the pixels in-place inside the browser's optimized memory using a Dart `Uint8ClampedList` view of the JS typed array (`JSUint8ClampedArray`).\n* **Asynchronous PNG Compression**: Rather than performing slow Dart-based PNG compression, we offload PNG creation back to the browser using the asynchronous `canvas.toBlob(...)` API. The browser compresses the image in its internal C++ thread pool, keeping the main tab responsive and resulting in near-instant processing.\n\n---\n\n## ✨ The User Experience (UX)\n\n1. **Simple Selection:** Choose any photo from your device's gallery or take a new one directly from the app.\n2. **Auto-Discovery:** The app's processing engine automatically identifies the main subject of your image.\n3. **Seamless Export:** Save the resulting transparent PNG directly to your local storage or share it with other applications.\n\n---\n\n## 📁 Project Structure\n\nThis repository is structured as a standard Flutter application.\n\n| Directory | Description |\n| --- | --- |\n| [`lib`](./lib) | The core Dart code and UI components of the application. |\n| [`assets`](./assets) | Static resources, including placeholder images and icons. |\n| [`android`](./android) / [`ios`](./ios) | Native platform configurations and bindings. |\n\n---\n\n## 🛠️ Getting Started\n\n### Prerequisites\n\nEnsure you have the latest stable **Flutter SDK** installed on your machine. \n\n### Setup the Workspace\n\nClone the repository and resolve dependencies:\n\n```bash\ngit clone [https://github.com/vicajilau/unback.git](https://github.com/vicajilau/unback.git)\ncd unback\n\n# Fetch dependencies\nflutter pub get\n\n```\n\n### Running the Application\n\nTo launch the app on your connected device or emulator, run:\n\n```bash\nflutter run\n\n```\n\n---\n\n## 📖 Usage Example\n\nSince this is a client-facing application rather than a library, usage is entirely through the graphical interface:\n\n1. Launch the app on your preferred device.\n2. Tap the **\"Upload Image\"** or **\"Camera\"** button.\n3. Wait for the processing to complete.\n4. Tap **\"Save\"** to download the isolated subject to your gallery.\n\n*If you wish to integrate the underlying background removal logic into your own code, check the core processing services located within the `lib/services/` directory.*\n\n---\n\n## 📄 License\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see [https://www.gnu.org/licenses/](https://www.google.com/search?q=https://www.gnu.org/licenses/).\n\nCopyright (C) 2026 Víctor Carreras\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicajilau%2Funback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvicajilau%2Funback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicajilau%2Funback/lists"}