{"id":26800596,"url":"https://github.com/ktsu-dev/iconhelper","last_synced_at":"2026-04-08T01:01:15.748Z","repository":{"id":265578038,"uuid":"881686353","full_name":"ktsu-dev/IconHelper","owner":"ktsu-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-02T23:10:10.000Z","size":367,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T09:48:05.886Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ktsu-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT.md","agents":null,"dco":null,"cla":null}},"created_at":"2024-11-01T03:03:31.000Z","updated_at":"2026-04-02T23:10:00.000Z","dependencies_parsed_at":"2026-02-06T03:00:37.809Z","dependency_job_id":null,"html_url":"https://github.com/ktsu-dev/IconHelper","commit_stats":null,"previous_names":["ktsu-dev/iconhelper"],"tags_count":117,"template":false,"template_full_name":null,"purl":"pkg:github/ktsu-dev/IconHelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FIconHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FIconHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FIconHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FIconHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktsu-dev","download_url":"https://codeload.github.com/ktsu-dev/IconHelper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FIconHelper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31535203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-03-29T20:17:56.967Z","updated_at":"2026-04-08T01:01:15.701Z","avatar_url":"https://github.com/ktsu-dev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ktsu.IconHelper\n\n\u003e A utility library for working with icons and images in .NET applications.\n\n[![License](https://img.shields.io/github/license/ktsu-dev/IconHelper)](https://github.com/ktsu-dev/IconHelper/blob/main/LICENSE.md)\n[![NuGet](https://img.shields.io/nuget/v/ktsu.IconHelper.svg)](https://www.nuget.org/packages/ktsu.IconHelper/)\n[![NuGet Downloads](https://img.shields.io/nuget/dt/ktsu.IconHelper.svg)](https://www.nuget.org/packages/ktsu.IconHelper/)\n[![Build Status](https://github.com/ktsu-dev/IconHelper/workflows/build/badge.svg)](https://github.com/ktsu-dev/IconHelper/actions)\n[![GitHub Stars](https://img.shields.io/github/stars/ktsu-dev/IconHelper?style=social)](https://github.com/ktsu-dev/IconHelper/stargazers)\n\n## Introduction\n\nIconHelper is a .NET library designed to simplify working with icons and images across different platforms and frameworks. It provides utilities for loading, manipulating, and converting icons between various formats, making it easier to manage application visual assets.\n\n## Features\n\n- **Icon Loading**: Load icons from files, resources, or embedded assets\n- **Format Conversion**: Convert between different icon formats (ICO, PNG, SVG, etc.)\n- **Resolution Management**: Extract and generate icons at different resolutions\n- **Platform Integration**: Work with platform-specific icon formats\n- **Color Manipulation**: Apply filters, change colors, or adjust transparency\n- **Batch Processing**: Process multiple icons with consistent settings\n- **Memory Efficiency**: Optimized for minimal memory usage\n\n## Installation\n\n### Package Manager Console\n\n```powershell\nInstall-Package ktsu.IconHelper\n```\n\n### .NET CLI\n\n```bash\ndotnet add package ktsu.IconHelper\n```\n\n### Package Reference\n\n```xml\n\u003cPackageReference Include=\"ktsu.IconHelper\" Version=\"x.y.z\" /\u003e\n```\n\n## Usage Examples\n\n### Basic Icon Loading\n\n```csharp\nusing ktsu.IconHelper;\n\n// Load an icon from a file\nvar icon = IconLoader.FromFile(\"path/to/icon.ico\");\n\n// Load from embedded resource\nvar resourceIcon = IconLoader.FromResource(\"MyNamespace.Resources.appicon.ico\");\n\n// Load from base64 string\nvar base64Icon = IconLoader.FromBase64(base64String);\n```\n\n### Icon Conversion\n\n```csharp\nusing ktsu.IconHelper;\n\n// Convert between formats\nvar pngBytes = IconConverter.ToPng(iconInstance);\nvar icoBytes = IconConverter.ToIco(bitmapInstance);\nvar svgContent = IconConverter.ToSvg(iconInstance);\n\n// Save directly to file\nIconConverter.SaveAsPng(iconInstance, \"output.png\");\n```\n\n### Resolution Extraction\n\n```csharp\nusing ktsu.IconHelper;\n\n// Get specific sizes from multi-resolution icon\nvar icon = IconLoader.FromFile(\"multisize.ico\");\nvar icon16 = IconResolution.Extract(icon, 16, 16);\nvar icon32 = IconResolution.Extract(icon, 32, 32);\nvar icon64 = IconResolution.Extract(icon, 64, 64);\n\n// Create a multi-resolution icon\nvar multiIcon = IconResolution.Combine(new[] { icon16, icon32, icon64 });\nIconLoader.SaveToFile(multiIcon, \"combined.ico\");\n```\n\n### Color Manipulation\n\n```csharp\nusing ktsu.IconHelper;\n\n// Adjust icon colors\nvar icon = IconLoader.FromFile(\"original.ico\");\n\n// Change specific color\nvar replacedColorIcon = IconColorizer.ReplaceColor(icon, Color.Blue, Color.Red);\n\n// Apply tint\nvar tintedIcon = IconColorizer.ApplyTint(icon, Color.FromArgb(128, 255, 0, 0));\n\n// Invert colors\nvar invertedIcon = IconColorizer.Invert(icon);\n\n// Adjust transparency\nvar transparentIcon = IconColorizer.SetTransparency(icon, 0.5f);\n```\n\n### Platform-Specific Usage\n\n```csharp\nusing ktsu.IconHelper;\nusing ktsu.IconHelper.Platforms;\n\n// Windows-specific icon handling\nvar windowsIcon = WindowsIconHelper.ExtractFromExe(\"application.exe\");\nvar fileTypeIcon = WindowsIconHelper.GetFileTypeIcon(\".pdf\");\n\n// macOS-specific icon handling\nvar macIcon = MacIconHelper.CreateFromImage(\"image.png\");\n\n// Cross-platform icon conversion\nvar platformIcon = PlatformIconConverter.ConvertToCurrent(genericIcon);\n```\n\n## API Reference\n\n### `IconLoader` Class\n\nProvides methods for loading icons from various sources.\n\n#### Methods\n\n| Name | Parameters | Return Type | Description |\n|------|------------|-------------|-------------|\n| `FromFile` | `string path` | `Icon` | Loads an icon from a file path |\n| `FromResource` | `string resourceName` | `Icon` | Loads an icon from an embedded resource |\n| `FromBase64` | `string base64String` | `Icon` | Creates an icon from a base64 encoded string |\n| `FromStream` | `Stream stream` | `Icon` | Loads an icon from a stream |\n| `SaveToFile` | `Icon icon, string path` | `void` | Saves an icon to a file |\n\n### `IconConverter` Class\n\nProvides methods for converting icons between different formats.\n\n#### Methods\n\n| Name | Parameters | Return Type | Description |\n|------|------------|-------------|-------------|\n| `ToPng` | `Icon icon` | `byte[]` | Converts an icon to PNG format |\n| `ToIco` | `Bitmap bitmap` | `byte[]` | Converts a bitmap to ICO format |\n| `ToSvg` | `Icon icon` | `string` | Converts an icon to SVG format |\n| `SaveAsPng` | `Icon icon, string path` | `void` | Saves an icon as a PNG file |\n| `SaveAsIco` | `Bitmap bitmap, string path` | `void` | Saves a bitmap as an ICO file |\n\n### `IconResolution` Class\n\nProvides methods for working with multi-resolution icons.\n\n#### Methods\n\n| Name | Parameters | Return Type | Description |\n|------|------------|-------------|-------------|\n| `Extract` | `Icon icon, int width, int height` | `Icon` | Extracts an icon at the specified resolution |\n| `Combine` | `IEnumerable\u003cIcon\u003e icons` | `Icon` | Combines multiple icons into a multi-resolution icon |\n| `GetAvailableSizes` | `Icon icon` | `Size[]` | Gets all available sizes in a multi-resolution icon |\n\n### `IconColorizer` Class\n\nProvides methods for manipulating icon colors.\n\n#### Methods\n\n| Name | Parameters | Return Type | Description |\n|------|------------|-------------|-------------|\n| `ReplaceColor` | `Icon icon, Color oldColor, Color newColor` | `Icon` | Replaces a specific color in an icon |\n| `ApplyTint` | `Icon icon, Color tint` | `Icon` | Applies a color tint to an icon |\n| `Invert` | `Icon icon` | `Icon` | Inverts the colors of an icon |\n| `SetTransparency` | `Icon icon, float alpha` | `Icon` | Adjusts the transparency of an icon |\n\n## Contributing\n\nContributions are welcome! Here's how you can help:\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\nPlease make sure to update tests as appropriate and adhere to the existing coding style.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsu-dev%2Ficonhelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktsu-dev%2Ficonhelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsu-dev%2Ficonhelper/lists"}