{"id":13528293,"url":"https://github.com/image-js/fast-png","last_synced_at":"2025-04-12T13:28:04.738Z","repository":{"id":44332933,"uuid":"43053114","full_name":"image-js/fast-png","owner":"image-js","description":"PNG image decoder and encoder written entirely in JavaScript","archived":false,"fork":false,"pushed_at":"2025-02-25T17:42:43.000Z","size":900,"stargazers_count":421,"open_issues_count":7,"forks_count":24,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-05T11:03:32.451Z","etag":null,"topics":["hacktoberfest","image","image-decoder","image-encoder","javascript","nodejs","png"],"latest_commit_sha":null,"homepage":"","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/image-js.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}},"created_at":"2015-09-24T07:57:54.000Z","updated_at":"2025-03-28T07:15:07.000Z","dependencies_parsed_at":"2024-02-13T13:50:42.126Z","dependency_job_id":null,"html_url":"https://github.com/image-js/fast-png","commit_stats":{"total_commits":96,"total_committers":9,"mean_commits":"10.666666666666666","dds":0.375,"last_synced_commit":"9563e3dcc66bd402c3a969dfe1027bf897ab9296"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/image-js%2Ffast-png","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/image-js%2Ffast-png/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/image-js%2Ffast-png/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/image-js%2Ffast-png/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/image-js","download_url":"https://codeload.github.com/image-js/fast-png/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248573078,"owners_count":21126758,"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":["hacktoberfest","image","image-decoder","image-encoder","javascript","nodejs","png"],"created_at":"2024-08-01T06:02:24.065Z","updated_at":"2025-04-12T13:28:04.713Z","avatar_url":"https://github.com/image-js.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# fast-png\n\nPNG image decoder and encoder written entirely in JavaScript.\n\n\u003ch3 align=\"center\"\u003e\n\n  \u003ca href=\"https://www.zakodium.com\"\u003e\n    \u003cimg src=\"https://www.zakodium.com/brand/zakodium-logo-white.svg\" width=\"50\" alt=\"Zakodium logo\" /\u003e\n  \u003c/a\u003e\n\n  \u003cp\u003e\n    Maintained by \u003ca href=\"https://www.zakodium.com\"\u003eZakodium\u003c/a\u003e\n  \u003c/p\u003e\n\n[![NPM version][npm-image]][npm-url]\n[![build status][ci-image]][ci-url]\n[![npm download][download-image]][download-url]\n\n\u003c/h3\u003e\n\n## Installation\n\n`$ npm install --save fast-png`\n\n## Usage\n\n### `decode(png[, options])`\n\n#### Arguments\n\n- `png` - A TypedArray or Buffer that contains the PNG data.\n- `options` - An object of options\n\n#### Options\n\n- `checkCrc` - If set to `true`, the CRC will be checked for each chunk and an error will be thrown in case it's wrong (default: false).\n\n### `encode(image)`\n\n#### Arguments\n\n- `png` - An object representing the image. You can pass an ImageData from the Canvas API or an object with the following properties:\n  - `width` - The width of the image\n  - `height` - The height of the image\n  - `data` - An array or TypedArray with the image data\n  - `depth` - A number indicating the color depth (only 8 and 16 are supported now). Default: `8`.\n  - `channels` - Number of channels, including alpha (1, 2, 3 and 4 are supported). Default: `4`.\n  - `text` - An object with key-value pairs representing `tEXt` chunks. The keys must have less than 80 characters.\n             The keys and values must have only characters in the latin1 charset (maximum code point of 255).\n             Default: `undefined`.\n\n### `hasPngSignature(array)`\n\nReturns whether the array starts with the PNG signature (magic bytes).\n\n## PNG standard\n\nSpec can be found at: https://www.w3.org/TR/PNG/\n\n## License\n\n[MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/fast-png.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/fast-png\n[ci-image]: https://github.com/image-js/fast-png/workflows/Node.js%20CI/badge.svg?branch=main\n[ci-url]: https://github.com/image-js/fast-png/actions?query=workflow%3A%22Node.js+CI%22\n[download-image]: https://img.shields.io/npm/dm/fast-png.svg?style=flat-square\n[download-url]: https://www.npmjs.com/package/fast-png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimage-js%2Ffast-png","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimage-js%2Ffast-png","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimage-js%2Ffast-png/lists"}