{"id":48038974,"url":"https://github.com/dnrovs/ocif-js","last_synced_at":"2026-04-04T14:04:59.700Z","repository":{"id":330772847,"uuid":"1123906197","full_name":"dnrovs/ocif-js","owner":"dnrovs","description":"Node.js library for manipulating OpenComputers Image Format images","archived":false,"fork":false,"pushed_at":"2025-12-27T22:19:34.000Z","size":1243,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-30T00:08:03.416Z","etag":null,"topics":["converter","image","minecraft","ocif","opencomputers","png"],"latest_commit_sha":null,"homepage":"https://dnrovs.github.io/ocif-js/","language":"TypeScript","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/dnrovs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-27T22:14:19.000Z","updated_at":"2025-12-27T22:19:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dnrovs/ocif-js","commit_stats":null,"previous_names":["dnrovs/ocif-js"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dnrovs/ocif-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnrovs%2Focif-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnrovs%2Focif-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnrovs%2Focif-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnrovs%2Focif-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnrovs","download_url":"https://codeload.github.com/dnrovs/ocif-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnrovs%2Focif-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: 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":["converter","image","minecraft","ocif","opencomputers","png"],"created_at":"2026-04-04T14:04:59.128Z","updated_at":"2026-04-04T14:04:59.694Z","avatar_url":"https://github.com/dnrovs.png","language":"TypeScript","readme":"# ocif-js\n\n~~Vibecoded~~ AI-written Node.js library for manipulating OpenComputers Image Format images.\n\n## Features\n\n-   Load OCIF images from a buffer (supports versions 5, 6, 7, and 8).\n-   Save OCIF images to a buffer.\n-   Create new images from scratch.\n-   Get and set individual pixels.\n-   Convert OCIF images to PNG format.\n-   Full support for Braille and text characters.\n-   Based on the original implementations in [Lua](https://github.com/IgorTimofeev/MineOS/blob/master/Libraries/Image.lua), [C++](https://github.com/Smok1e/OCIFEdit), and [Java](https://github.com/IgorTimofeev/OCIFImageConverter).\n\n## Installation\n\nYou can install the library using npm:\n\n```bash\nnpm install ocif-js\n```\n\n## Usage\n\nHere is a simple example of how to use the library:\n\n```typescript\nimport { OCIF } from 'ocif-js';\nimport * as fs from 'fs';\n\n// Make some colorful text\nconst text = \"God save Claude Code\";\n\n// Create a new 20x1 image\nconst image = new OCIF(text.length, 1);\n\nfor (let i = 0; i \u003c text.length; i++) {\n    image.setPixel(i, 0, {\n        background: 0x000000,\n        foreground: [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xff00ff, 0x00ffff][i % 6],\n        alpha: 1,\n        character: text[i],\n    });\n}\n\n// Convert the image to a PNG buffer\nconst pngBuffer = image.toPNG({ scale: 2 });\nfs.writeFileSync('hello.png', pngBuffer);\nconsole.log('Saved image to hello.png');\n\n// Save the image to an OCIF buffer\nconst ocifBuffer = image.toBuffer();\nfs.writeFileSync('hello.pic', ocifBuffer);\nconsole.log('Saved image to hello.pic');\n\n// Load an OCIF image from a file\ntry {\n    const loadedOcifBuffer = fs.readFileSync('hello.pic');\n    const loadedImage = OCIF.fromBuffer(loadedOcifBuffer);\n    console.log(`Loaded image with width ${loadedImage.width} and height ${loadedImage.height}`);\n} catch (error) {\n    console.error('Error loading image:', error);\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnrovs%2Focif-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnrovs%2Focif-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnrovs%2Focif-js/lists"}