{"id":27953439,"url":"https://github.com/zjzmisaka/tagcloudgenerator","last_synced_at":"2025-05-07T17:11:22.549Z","repository":{"id":112792938,"uuid":"606637892","full_name":"ZjzMisaka/TagCloudGenerator","owner":"ZjzMisaka","description":"TagCloudGenerator is a C# library that allows you to generate a tag cloud bitmap image from a given set of strings and their corresponding weights. You can customize the appearance of the tag cloud by specifying various options, such as font size, font color, background color, and more.","archived":false,"fork":false,"pushed_at":"2023-07-27T02:49:42.000Z","size":116,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-07-27T03:35:52.636Z","etag":null,"topics":["bitmap","csharp","image","tag-cloud","tagcloud","word-cloud","wordcloud"],"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/ZjzMisaka.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}},"created_at":"2023-02-26T04:47:08.000Z","updated_at":"2023-06-28T10:37:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"b35b4a81-e93b-4acb-8495-9e3b5e179a3f","html_url":"https://github.com/ZjzMisaka/TagCloudGenerator","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZjzMisaka%2FTagCloudGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZjzMisaka%2FTagCloudGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZjzMisaka%2FTagCloudGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZjzMisaka%2FTagCloudGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZjzMisaka","download_url":"https://codeload.github.com/ZjzMisaka/TagCloudGenerator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922352,"owners_count":21825639,"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":["bitmap","csharp","image","tag-cloud","tagcloud","word-cloud","wordcloud"],"created_at":"2025-05-07T17:11:16.876Z","updated_at":"2025-05-07T17:11:22.544Z","avatar_url":"https://github.com/ZjzMisaka.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TagCloudGenerator\n\u003cimg src=\"https://www.nuget.org/Content/gallery/img/logo-header.svg?sanitize=true\" height=\"30px\"\u003e\n\nGenerates a tag cloud bitmap using weighted strings and customizable options for font size, color, background, and more.\n\n### Download\nTagCloudGenerator is available as [Nuget Package](https://www.nuget.org/packages/TagCloudGenerator/) now.\n\n## Sample Images\n\nBelow are some sample images showing the output of the TagCloudGenerator:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg width=1000 align=\"center\" src=\"https://github.com/ZjzMisaka/AnimeReport/blob/main/tags.bmp\"/\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg width=1000 align=\"center\" src=\"https://github.com/ZjzMisaka/AnimeReport/blob/main/companies.bmp\"/\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Getting Started\n\nYou can use the TagCloudGenerator library by following these steps:\n\n1. Create a dictionary of strings and their corresponding weights. The weights can be set to the number of occurrences of each string.\n\n   ```csharp\n   Dictionary\u003cstring, float\u003e tagDic = new Dictionary\u003cstring, float\u003e();\n   tagDic[\"J.C.STAFF\"] = 32;\n   ```\n\n2. Create a `TagCloudOption` object, and set its properties as needed.\n\n   ```csharp\n   TagCloudOption tagCloudOption = new TagCloudOption();\n   // Set tagCloudOption properties\n   // tagCloudOption.Xxx = xxx;\n   ```\n\n3. If you want to specify special settings for individual characters, create a dictionary of `TagOption` objects.\n\n   ```csharp\n   Dictionary\u003cstring, TagOption\u003e tagOptionDic = new Dictionary\u003cstring, TagOption\u003e();\n   // Set option for single text\n   // tagOptionDic[\"J.C.STAFF\"] = new TagOption() { Rotate = new Rotate(0) };\n   ```\n\n4. Create a `TagCloud` object using the dictionaries and the `TagCloudOption` object, and then call the `Get()` method to generate the bitmap image.\n\n   ```csharp\n   Bitmap bmp = new TagCloud(tagDic, tagCloudOption, tagOptionDic).Get();\n   ```\n\n   If you don't need to specify special settings for individual characters, you can omit the `tagOptionDic` parameter:\n\n   ```csharp\n   Bitmap bmp = new TagCloud(tagDic, tagCloudOption).Get();\n   ```\n\n## TagCloudOption Properties\n\nThe `TagCloudOption` object allows you to customize various aspects of the tag cloud. Below is a list of its properties and their descriptions:\n\n|Property|Description|\n|--|--|\n|Range RandomRotateRange|If not null, take random values from RandomRotateRange|\n|List\\\u003cint\u003e RotateList|If RandomRotateRange is null, take rotate randomly from RotateList|\n|int TagSpacing|Minimum pixel spacing between adjacent tags|\n|int HorizontalOuterMargin|Minimum horizontal outer margin|\n|int VerticalOuterMargin|Minimum vertical outer margin|\n|List\\\u003cColor\u003e FontColorList|Set possible font colors for bitmap tags|\n|ColorOption BackgroundColor|Set background color for bitmap tags|\n|FontFamily FontFamily|Set font family for bitmap tags|\n|Range FontSizeRange|Set minimum and maximum font sizes|\n|double AngleStep|Set angle step for spiral algorithm|\n|double RadiusStep|Set radius step for spiral algorithm|\n|double AngleDecreaseFactor|Angle step decreasing factor|\n|double RadiusDecreaseFactor|Radius step decreasing factor|\n|bool IsRandomInitAngle|Set if is random init angle or not for spiral algorithm|\n|int HorizontalCanvasGrowthStep|Horizontal canvas growth step|\n|int VerticalCanvasGrowthStep|Vertical canvas growth step|\n|ImgSize OutputSize|Output bitmap image size|\n|ImgSize InitSize|Init bitmap image size, the canvas will grow when the canvas is filled|\n|string MaskPath|If you need to generate a tag cloud through masking, set the path for the masking image|\n|bool ShowMask|Set whether to display mask image in generated bitmap image|\n|bool StretchMask|Set whether to stretch the mask to match the canvas|\n|int Accuracy|Accuracy of TagSpacing check, default = 1, if =0 then check all pixel. It is used to increase operating efficiency|\n\n## TagOption Properties\n\nThe `TagOption` object allows you to specify special settings for individual charactersin the tag cloud. Below is a list of its properties and their descriptions:\n\n|Property|Description|\n|--|--|\n|Rotate Rotate|Rotate of tag|\n|FontColor FontColor|FontColor of tag|\n|FontFamily FontFamily|FontFamily of tag|\n\n## License\nThis project is licensed under the [OMSPL](https://github.com/ZjzMisaka/TagCloudGenerator/blob/main/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjzmisaka%2Ftagcloudgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzjzmisaka%2Ftagcloudgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjzmisaka%2Ftagcloudgenerator/lists"}