{"id":26042694,"url":"https://github.com/offerrall/photoff","last_synced_at":"2025-10-10T19:39:35.583Z","repository":{"id":279931264,"uuid":"936530548","full_name":"offerrall/photoff","owner":"offerrall","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-28T11:35:42.000Z","size":11674,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T15:38:04.543Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/offerrall.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}},"created_at":"2025-02-21T08:45:18.000Z","updated_at":"2025-02-28T11:35:46.000Z","dependencies_parsed_at":"2025-02-28T15:39:08.125Z","dependency_job_id":"1fc22a30-aa4f-4e28-a670-1ad2d31696c4","html_url":"https://github.com/offerrall/photoff","commit_stats":null,"previous_names":["offerrall/photoff"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offerrall%2Fphotoff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offerrall%2Fphotoff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offerrall%2Fphotoff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offerrall%2Fphotoff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offerrall","download_url":"https://codeload.github.com/offerrall/photoff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242428470,"owners_count":20126619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-03-07T16:44:35.861Z","updated_at":"2025-10-10T19:39:35.578Z","avatar_url":"https://github.com/offerrall.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PhotoFF\n\n**PhotoFF** is a high-performance GPU image processing library written in Python and accelerated with CUDA.\nOriginally developed as part of a custom OBS-style rendering engine, it has evolved into a personal tool that I intend to use and maintain for the foreseeable future.\n\nI'm sharing this project because it might be beneficial to others, and I highly value real-world feedback. Please note that this is not a commercial product but a project I am passionate about.\n\n---\n\n## ⚡ Key Features\n\n- **CUDA Acceleration:** Experience real-time filters, blending, resizing, and more, all powered by your GPU.\n- **Smart Memory Management:** Allocate memory once and reuse it efficiently with dynamic size adjustments.\n- **Simple and Direct Python API:** Enjoy a user-friendly API similar to PIL, but supercharged for GPU processing.\n- **Exceptional Performance:** [Benchmarks](https://offerrall.github.io/photoff/benchmarks/)\n- **Comprehensive Documentation:** Benefit from clear explanations and practical examples.\n- **Minimal Dependencies:** Requires only `pillow`, `cffi`.\n\n---\n\n## 🧠 Why PhotoFF Exists\n\nMy motivation for creating PhotoFF stemmed from a need for a solution beyond the capabilities of existing libraries like PIL for tasks such as:\n\n- Real-time scene composition.\n- Generating GPU-accelerated overlays with visual effects.\n- Batch image processing (creating thumbnails, banners, and collages).\n- Developing fluid visual interfaces with dynamic filters.\n- Building automation tools for creators, streamers, VTubers, and dashboards.\n\n---\n\n## 📦 Installation\n\n### Prerequisites\n\n- NVIDIA GPU with CUDA support\n- CUDA Toolkit 11.0+\n- Python packages: `cffi`, `pillow`,\n\n### Installation\n\nFor detailed setup and compilation instructions, please refer to the [Installation Guide](https://offerrall.github.io/photoff/installation/).\n\n---\n\n## 🧪 Quick Example\n\n```python\nfrom photoff.operations.filters import apply_gaussian_blur, apply_corner_radius\nfrom photoff.io import save_image, load_image\nfrom photoff import CudaImage\n\n# Load image to GPU memory\nsrc_image = load_image(\"./assets/stock.jpg\")\n\n# Apply filters\napply_gaussian_blur(src_image, radius=5.0)\napply_corner_radius(src_image, size=200)\n\n# Save result\nsave_image(src_image, \"./assets/gaussian_blur_test.png\")\n\n# Free GPU memory\nsrc_image.free()\n```\n\n---\n\n## 🔁 Buffer Reuse in Action\n\n```python\n# Allocate a single large buffer\nshared_buffer = CudaImage(5000, 5000)\n\n# Reuse it for different sizes\nshared_buffer.width, shared_buffer.height = 800, 600\nresize(image1, 800, 600, resize_image_cache=shared_buffer)\n\nshared_buffer.width, shared_buffer.height = 1280, 720\nresize(image2, 1280, 720, resize_image_cache=shared_buffer)\n\n# No reallocs, no fragmentation, max performance\n```\n\n## 📚 Documentation\n\nExplore the full documentation at [https://offerrall.github.io/photoff/](https://offerrall.github.io/photoff/):\n\n- [🔰 Basics](https://offerrall.github.io/photoff/basics/)\n- [⚙️ Advanced Techniques](https://offerrall.github.io/photoff/advanced/)\n- [🔬 API Reference](https://offerrall.github.io/photoff/api/)\n\n## 🤝 Contributing\n\nContributions are welcome! While this is a personal project, I intend to continue its development and improvement. If you're interested in contributing, please feel free to jump in.\n\n---\n\n## 📃 License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofferrall%2Fphotoff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fofferrall%2Fphotoff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofferrall%2Fphotoff/lists"}