{"id":25311515,"url":"https://github.com/xiokka/rustic_bitmap","last_synced_at":"2025-04-07T11:48:36.276Z","repository":{"id":251137910,"uuid":"836503693","full_name":"xiokka/rustic_bitmap","owner":"xiokka","description":"A simple Rust library for bitmap manipulation. This library provides tools for reading, modifying, and writing bitmap images.","archived":false,"fork":false,"pushed_at":"2024-08-02T00:24:49.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T14:43:52.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiokka.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}},"created_at":"2024-08-01T01:54:37.000Z","updated_at":"2024-08-03T23:11:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4ae66c5-7ac2-4d59-921a-e977be2c269d","html_url":"https://github.com/xiokka/rustic_bitmap","commit_stats":null,"previous_names":["xiokka/rustic_bitmap"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiokka%2Frustic_bitmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiokka%2Frustic_bitmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiokka%2Frustic_bitmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiokka%2Frustic_bitmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiokka","download_url":"https://codeload.github.com/xiokka/rustic_bitmap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648913,"owners_count":20972944,"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-02-13T14:41:24.737Z","updated_at":"2025-04-07T11:48:36.269Z","avatar_url":"https://github.com/xiokka.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rustic_bitmap\n## Description\nA simple Rust library for bitmap manipulation. This library provides tools for reading, modifying, and writing bitmap images.\n\n## Installation\nClone this library.\n```bash\ngit clone https://github.com/xiokka/rustic_bitmap.git\n```\n\nAdd the dependency to your Cargo.toml, specifying the location where you cloned the library.\n```toml\n[dependencies]\nrustic_bitmap = { path = \"modify/this/path/to/library\" }\n```\n\nIn your Rust source file, import the crate.\n```rust\nuse rustic_bitmap::*;\n```\n\n\n## Usage\nAll operations are performed on vectors of bytes.\n```rust\n//Create a new empty bitmap using new_bitmap(width, height, bits_per_pixel)\nlet mut bmp:Vec\u003cu8\u003e = Vec::\u003cu8\u003e::new_bitmap(88, 31, 24);\n\n// Draws a circle with a given radius, center and color\nlet circle_center = Point {x:87, y:0};\nlet color_circle = Rgb {r:255, g:0, b:0}; // Red\nlet radius = 20;\nbmp.draw_circle(\u0026circle_center, radius, \u0026color_circle);\n\n// Draws a blue rectangle where position1 and position2 are opposing corners\nlet position1: Point = Point {x: 0, y: 0};\nlet position2: Point = Point {x: 87, y:30};\nlet color = Rgb {r:0, g:0, b:255}; // Blue\nbmp.draw_rectangle(\u0026position1, \u0026position2, \u0026color);\n\n// Draws a string\nlet position: Point = Point {x: 3, y: 20};\nlet color = Rgb {r:255, g:255, b:255}; // White\nbmp.draw_string(\"Hello!\", \u0026position, \u0026color);\n\n// Store vector of bytes in file_path\nlet file_path = \"button.bmp\";\nlet mut file = File::create(file_path).unwrap();\nfile.write_all(\u0026bmp).unwrap();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiokka%2Frustic_bitmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiokka%2Frustic_bitmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiokka%2Frustic_bitmap/lists"}