{"id":32037669,"url":"https://github.com/tzinmein/xbrz-sharp","last_synced_at":"2026-04-16T00:32:12.198Z","repository":{"id":317536156,"uuid":"1067824299","full_name":"tzinmein/xbrz-sharp","owner":"tzinmein","description":".NET 8 port of xBRZ 1.8 – high-quality 2D image upscaling library.","archived":false,"fork":false,"pushed_at":"2025-11-08T15:27:24.000Z","size":725,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-02T21:51:31.376Z","etag":null,"topics":["2d","dotnet","image","image-processing","upscaling","xbrz"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tzinmein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2025-10-01T12:51:01.000Z","updated_at":"2025-11-08T15:21:07.000Z","dependencies_parsed_at":"2025-10-01T15:23:49.016Z","dependency_job_id":"cf6fc032-639f-4452-a9e9-1c7628c14434","html_url":"https://github.com/tzinmein/xbrz-sharp","commit_stats":null,"previous_names":["tzinmein/xbrz-sharp"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tzinmein/xbrz-sharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzinmein%2Fxbrz-sharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzinmein%2Fxbrz-sharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzinmein%2Fxbrz-sharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzinmein%2Fxbrz-sharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tzinmein","download_url":"https://codeload.github.com/tzinmein/xbrz-sharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzinmein%2Fxbrz-sharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["2d","dotnet","image","image-processing","upscaling","xbrz"],"created_at":"2025-10-17T09:01:59.705Z","updated_at":"2026-04-16T00:32:12.190Z","avatar_url":"https://github.com/tzinmein.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# XbrzSharp\n\n![.NET Build \u0026 Test](https://github.com/tzinmein/xbrz-sharp/workflows/.NET%20Build,%20Test,%20and%20Publish/badge.svg)\n[![NuGet](https://img.shields.io/nuget/v/XbrzSharp.svg?style=flat-square)](https://www.nuget.org/packages/XbrzSharp/)\n[![License](https://img.shields.io/badge/License-GPL%203.0%20%2B%200BSD-blue.svg)](LICENSE.md)\n![.NET](https://img.shields.io/badge/.NET-8.0-blue)\n\n[xBRZ](https://sourceforge.net/projects/xbrz/): \"Scale by rules\" – high quality image upscaling filter by Zenju.\n\nThis is a .NET 8 port of xBRZ 1.8, based on the [Java port by Stanio](https://github.com/stanio/xbzr-java).\n\n**Important:** This project is **distinct** from another .NET port [xBRZ.NET](https://github.com/Helion-Engine/xBRZ.NET) (namespace `xBRZNet`).\n\nRight now it's a very straightforward port. Performance optimizations and more idiomatic .NET code may be added in the future.\n\nCopyright (c) 2025 Ho Tzin Mein\n\n## Projects\n\n- **XbrzSharp** – Core xBRZ upscaling logic (library)\n- **XbrzSharpTool** – Command-line tool for batch image upscaling\n\n## Usage\n\n### Command-Line Tool\n\n```sh\ndotnet run --project XbrzSharpTool -- \u003csource\u003e [scaling_factor]\n```\n\n- `\u003csource\u003e`: Path to the input image file or directory. If a directory is specified, all supported images in the directory will be upscaled.\n- `[scaling_factor]`: Optional integer (default: 2). Must be between 2 and 6.\n\nThe output will be saved as `\u003csource-image\u003e@\u003cfactor\u003ex.png` in the same directory as the input file(s).\n\n### Library API Example\n\nYou can use the `XbrzSharp` library in your own .NET projects for programmatic upscaling:\n\n```csharp\nusing System.Drawing;\nusing System.Drawing.Imaging;\nusing Xbrz;\n\n// Load your image as a Bitmap\nusing var bitmap = new Bitmap(\"input.png\");\n\n// Convert to ARGB int[] array\nint width = bitmap.Width, height = bitmap.Height;\nint[] srcPixels = new int[width * height];\nvar rect = new Rectangle(0, 0, width, height);\nvar data = bitmap.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);\nSystem.Runtime.InteropServices.Marshal.Copy(data.Scan0, srcPixels, 0, srcPixels.Length);\nbitmap.UnlockBits(data);\n\n// Perform scaling\nint factor = 3;\nvar scaler = new XbrzScaler(factor, withAlpha: true);\nint[] scaledPixels = scaler.ScaleImage(srcPixels, null, width, height);\n\n// Convert back to Bitmap\nint scaledWidth = width * factor, scaledHeight = height * factor;\nvar scaledBitmap = new Bitmap(scaledWidth, scaledHeight, PixelFormat.Format32bppArgb);\nvar scaledRect = new Rectangle(0, 0, scaledWidth, scaledHeight);\nvar scaledData = scaledBitmap.LockBits(scaledRect, ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);\nSystem.Runtime.InteropServices.Marshal.Copy(scaledPixels, 0, scaledData.Scan0, scaledPixels.Length);\nscaledBitmap.UnlockBits(scaledData);\n\n// Save the result\nscaledBitmap.Save(\"output@3x.png\");\n```\n## Attribution for Test Assets\n\nTest inputs and expected outputs are copied from the xBRZ Java port by Stanio.\n\n## License\n\n- **Core library (`xBrzNet`)**: [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.html)\n- **Other code (tools, tests, helpers, documentation)**: [BSD Zero Clause License](https://spdx.org/licenses/0BSD.html)\n\nSee [LICENSE](LICENSE.md) for full license texts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzinmein%2Fxbrz-sharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftzinmein%2Fxbrz-sharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzinmein%2Fxbrz-sharp/lists"}