{"id":26213322,"url":"https://github.com/douglau/pix","last_synced_at":"2025-04-15T16:59:36.945Z","repository":{"id":57655963,"uuid":"179970832","full_name":"DougLau/pix","owner":"DougLau","description":"Library for working with pixels and images","archived":false,"fork":false,"pushed_at":"2025-04-06T14:57:22.000Z","size":561,"stargazers_count":26,"open_issues_count":10,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T16:59:25.550Z","etag":null,"topics":["image-processing"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DougLau.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2019-04-07T13:34:25.000Z","updated_at":"2025-04-06T14:57:25.000Z","dependencies_parsed_at":"2023-12-28T21:35:02.236Z","dependency_job_id":"2b60f15d-d0be-4d95-b431-289437dc2b68","html_url":"https://github.com/DougLau/pix","commit_stats":{"total_commits":298,"total_committers":4,"mean_commits":74.5,"dds":"0.14093959731543626","last_synced_commit":"3a2480d1fb7fefa524ab06c5a8877eef07f56ee7"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DougLau%2Fpix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DougLau%2Fpix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DougLau%2Fpix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DougLau%2Fpix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DougLau","download_url":"https://codeload.github.com/DougLau/pix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249116231,"owners_count":21215142,"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":["image-processing"],"created_at":"2025-03-12T09:18:41.945Z","updated_at":"2025-04-15T16:59:36.913Z","avatar_url":"https://github.com/DougLau.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pix\n\nLibrary for image conversion and compositing.\n\nA raster image can be cheaply converted to and from raw byte buffers,\nenabling interoperability with other crates.\n\nMany image formats are supported:\n\n* Bit depth: 8- or 16-bit integer and 32-bit float\n* Alpha: *premultiplied* or *straight*\n* Gamma: *linear* or *sRGB*\n* Color models:\n  - `RGB` / `BGR` (*red*, *green*, *blue*)\n  - `CMY` (*cyan*, *magenta*, *yellow*)\n  - `Gray` (*luma* / *relative luminance*)\n  - `HSV` (*hue*, *saturation*, *value*)\n  - `HSL` (*hue*, *saturation*, *lightness*)\n  - `HWB` (*hue*, *whiteness*, *blackness*)\n  - `YCbCr` (used by JPEG)\n  - `Matte` (*alpha* only)\n  - `OkLab` (*lightness*, *green/red*, *blue/yellow*)\n  - `XYZ` (CIE 1931 XYZ)\n\n### HWB Color Example\n```rust\nuse pix::{hwb::SHwb8, rgb::SRgb8, Raster};\n\nlet mut r = Raster::with_clear(256, 256);\nfor (y, row) in r.rows_mut(()).enumerate() {\n    for (x, p) in row.iter_mut().enumerate() {\n        let h = ((x + y) \u003e\u003e 1) as u8;\n        let w = y.saturating_sub(x) as u8;\n        let b = x.saturating_sub(y) as u8;\n        *p = SHwb8::new(h, w, b);\n    }\n}\n// Convert to SRgb8 color model\nlet raster = Raster::\u003cSRgb8\u003e::with_raster(\u0026r);\n```\n\n![Colors](https://raw.githubusercontent.com/DougLau/pix/master/res/colors.png)\n\n### Compositing Example\n\nCompositing is supported for *premultiplied* images with *linear* gamma.\n\n```rust\nuse pix::{ops::SrcOver, rgb::Rgba8p, Raster};\n\nlet mut r0 = Raster::with_clear(100, 100);\nlet r1 = Raster::with_color(5, 5, Rgba8p::new(80, 0, 80, 200));\nr0.composite_raster((40, 40), \u0026r1, (), SrcOver);\n```\n\n## Documentation\n[https://docs.rs/pix](https://docs.rs/pix)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglau%2Fpix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouglau%2Fpix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglau%2Fpix/lists"}