{"id":19521845,"url":"https://github.com/inochi2d/kra-d","last_synced_at":"2026-03-02T12:42:18.955Z","repository":{"id":177661132,"uuid":"660383056","full_name":"Inochi2D/kra-d","owner":"Inochi2D","description":"Experimental KRA loader made for Inochi Creator","archived":false,"fork":false,"pushed_at":"2025-07-19T14:13:51.000Z","size":52,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-19T18:29:28.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Inochi2D.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-06-29T22:17:46.000Z","updated_at":"2025-07-19T14:13:55.000Z","dependencies_parsed_at":"2024-11-11T00:45:35.825Z","dependency_job_id":null,"html_url":"https://github.com/Inochi2D/kra-d","commit_stats":null,"previous_names":["inochi2d/kra-d"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Inochi2D/kra-d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inochi2D%2Fkra-d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inochi2D%2Fkra-d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inochi2D%2Fkra-d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inochi2D%2Fkra-d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inochi2D","download_url":"https://codeload.github.com/Inochi2D/kra-d/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inochi2D%2Fkra-d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285431199,"owners_count":27170451,"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","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-11T00:35:25.357Z","updated_at":"2025-11-20T12:02:10.546Z","avatar_url":"https://github.com/Inochi2D.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KRA-D\n`kra-d` is a port of [libkra](https://github.com/2shady4u/libkra) to D to support basic extraction of layer info and layer data from krita files.\n\n### Dependencies\n\n`dxml` by jmdavis is required\n\n- [https://github.com/jmdavis/dxml](https://github.com/jmdavis/dxml)\n- [https://code.dlang.org/packages/dxml](https://github.com/jmdavis/dxml)\n\n## Parsing a document\nTo parse a Krita document, use `parseDocument` in `kra`.\n```d\nKRA document = parseDocument(\"myFile.kra\");\n```\n\n## Extracting layer data from layer\nTo extract layer data (textures) from a layer use `Layer.extractLayerImage()`\n```d\nKRA doc = parseDocument(\"myfile.kra\");\nforeach(layer; doc.layers) {\n    \n    // Skip non-image layers\n    if (layer.type != LayerType.Any) continue;\n\n    // Extract the layer image data.\n    // The output RGBA output is stored in Layer.data\n    layer.extractLayerImage();\n\n    // write_image from imagefmt is used here to export the layer as a PNG\n    write_image(buildPath(outputFolder, layer.name~\".png\"), layer.width, layer.height, layer.data, 4);\n}\n```\n\n## ToDO\n\n- Add support to *Colorize Mask*\n\n## Current Limitations\n\n- Only support for 'RGBA 8bit integer' documents\n- Unsupported *Transparency Mask*\n- Unsupported *Filter  Mask*\n- Unsupported *Transform Mask*\n---\n\n**Thanks to LunaTheFoxgirl** for the inspiration for the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finochi2d%2Fkra-d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finochi2d%2Fkra-d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finochi2d%2Fkra-d/lists"}