{"id":26194736,"url":"https://github.com/benpollarduk/netaf.imaging","last_synced_at":"2026-02-08T17:00:57.854Z","repository":{"id":264940486,"uuid":"894550140","full_name":"benpollarduk/NetAF.Imaging","owner":"benpollarduk","description":"Imaging extensions for the NetAF library.","archived":false,"fork":false,"pushed_at":"2026-01-14T09:33:58.000Z","size":153,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-14T13:22:46.667Z","etag":null,"topics":["adventure","ascii-art","console","csharp","fiction","imaging","interactive","netaf","text"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benpollarduk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-26T14:52:59.000Z","updated_at":"2026-01-14T09:34:01.000Z","dependencies_parsed_at":"2026-01-06T05:01:12.089Z","dependency_job_id":null,"html_url":"https://github.com/benpollarduk/NetAF.Imaging","commit_stats":null,"previous_names":["benpollarduk/netaf.imaging"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/benpollarduk/NetAF.Imaging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.Imaging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.Imaging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.Imaging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.Imaging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benpollarduk","download_url":"https://codeload.github.com/benpollarduk/NetAF.Imaging/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benpollarduk%2FNetAF.Imaging/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29237067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T14:18:14.570Z","status":"ssl_error","status_checked_at":"2026-02-08T14:18:14.071Z","response_time":57,"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":["adventure","ascii-art","console","csharp","fiction","imaging","interactive","netaf","text"],"created_at":"2025-03-12T01:59:52.121Z","updated_at":"2026-02-08T17:00:57.847Z","avatar_url":"https://github.com/benpollarduk.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# NetAF.Imaging\nExtension to add simple imaging capabilities to NetAF.\n\n![icon](.nuget/Icon.bmp)\n\n[![main-ci](https://github.com/benpollarduk/NetAF.Imaging/actions/workflows/main-ci.yml/badge.svg)](https://github.com/benpollarduk/NetAF.Imaging/actions/workflows/main-ci.yml)\n[![GitHub release](https://img.shields.io/github/release/benpollarduk/NetAF.Imaging.svg)](https://github.com/benpollarduk/NetAF.Imaging/releases)\n[![NuGet](https://img.shields.io/nuget/v/netaf.imaging.svg)](https://www.nuget.org/packages/netaf.imaging/)\n[![NuGet Downloads](https://img.shields.io/nuget/dt/netaf.imaging)](https://www.nuget.org/packages/netaf.imaging/)\n[![codecov](https://codecov.io/gh/benpollarduk/NetAF.Imaging/graph/badge.svg?token=CFqSF657Oc)](https://codecov.io/gh/benpollarduk/NetAF.Imaging)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.Imaging\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.Imaging)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.Imaging\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.Imaging)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.Imaging\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.Imaging)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.Imaging\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.Imaging)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=benpollarduk_NetAF.Imaging\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=benpollarduk_NetAF.Imaging)\n[![License](https://img.shields.io/github/license/benpollarduk/NetAF.Imaging.svg)](https://opensource.org/licenses/MIT)\n\n\u003c/div\u003e\n\n## Overview\nNetAF.Imaging provides extensions to [NetAF](https://github.com/benpollarduk/NetAF) to add simple functions to convert images to visuals.\n\n## Getting Started\n\n### Clone the repo/pull NuGet\nClone the repo:\n```bash\ngit clone https://github.com/benpollarduk/netaf.imaging.git\n```\nOr add the NuGet package:\n```bash\ndotnet add package NetAF.Imaging\n```\n\n### Hello World\nGenerating visuals is made easy with the *VisualHelper* class. The following example generates a visual on the console:\n```csharp\nvar displaySize = new Size(80, 50);\nvar adapter = new ConsoleAdapter();\n\nvar frame = VisualHelper.CreateFrame(@\"C:\\TestImage.jpg\", displaySize, CellAspectRatio.Console);\nadapter.RenderFrame(frame);\n```\n\nThe original image:\n\n![image](/NetAF.Imaging.TestConsole/Tree.jpg)\n\nThe generated visual:\n\n\u003cimg width=\"713\" height=\"436\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c65f8976-e53d-45e8-acf7-ea3e0af5681c\" /\u003e\n\nThis can be used in a game:\n\n```csharp\nvar frame = VisualHelper.CreateFrame(@\"C:\\TestImage.jpg\", displaySize, CellAspectRatio.Console);\ngame.ChangeMode(new VisualMode(frame));\n```\n\nHere is a simple room that contains a command to look at the view.\n```csharp\nreturn new Room(\"Hillside\", \"A wild hillside with a lone tree\", commands:\n[\n    new CustomCommand(new CommandHelp(\"Look at view\", \"Look at the current view.\"), true, true, (game, args) =\u003e\n    {\n        var frame = VisualHelper.CreateFrame(@\"C:\\TestImage.jpg\", game.Configuration.DisplaySize, CellAspectRatio.Console);\n        game.ChangeMode(new VisualMode(frame));\n        return new(ReactionResult.GameModeChanged, string.Empty);\n    })\n ]);\n```\n\n### Applying Textures\nA texturizer can be applied to add extra depth to the image:\n\n```csharp\nvar frame = VisualHelper.CreateFrame(@\"C:\\TestImage.jpg\", displaySize, CellAspectRatio.Console, new BrightnessTexturizer());\n```\n\nThe generated visual:\n\n\u003cimg width=\"713\" height=\"436\" alt=\"image\" src=\"https://github.com/user-attachments/assets/79ce7110-0339-4507-9f28-96861c986128\" /\u003e\n\n## Documentation\nPlease visit [https://benpollarduk.github.io/NetAF-docs/docs/visuals.html](https://benpollarduk.github.io/NetAF-docs/docs/visuals.html) to view the NetAF.Imaging documentation.\n\n## For Open Questions\nVisit https://github.com/benpollarduk/NetAF.Imaging/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenpollarduk%2Fnetaf.imaging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenpollarduk%2Fnetaf.imaging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenpollarduk%2Fnetaf.imaging/lists"}