{"id":26746943,"url":"https://github.com/zerasul/image-reader-helper","last_synced_at":"2025-04-14T21:07:11.631Z","repository":{"id":36975078,"uuid":"370834353","full_name":"zerasul/image-reader-helper","owner":"zerasul","description":"Image Reader Helper Lib Written in TypeScript","archived":false,"fork":false,"pushed_at":"2023-12-18T04:04:51.000Z","size":169,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T21:06:56.585Z","etag":null,"topics":[],"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/zerasul.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}},"created_at":"2021-05-25T21:38:55.000Z","updated_at":"2022-04-13T11:40:31.000Z","dependencies_parsed_at":"2023-09-27T17:48:12.679Z","dependency_job_id":null,"html_url":"https://github.com/zerasul/image-reader-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerasul%2Fimage-reader-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerasul%2Fimage-reader-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerasul%2Fimage-reader-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerasul%2Fimage-reader-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerasul","download_url":"https://codeload.github.com/zerasul/image-reader-helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248961237,"owners_count":21189993,"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-03-28T09:16:09.556Z","updated_at":"2025-04-14T21:07:11.603Z","avatar_url":"https://github.com/zerasul.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Read Helper\n\n\n[![Test](https://github.com/zerasul/image-reader-helper/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/zerasul/image-reader-helper/actions/workflows/main.yml) [![npm](https://img.shields.io/npm/v/@zerasul/image-read-helper?color=green)](https://www.npmjs.com/package/@zerasul/image-read-helper) ![npm](https://img.shields.io/npm/dt/@zerasul/image-read-helper?style=flat)\n\nThis library allows you to get some information about images; reading and getting information like width, height and the palette colour.\n\n## Instalation\n\nTo install this library, use ```npm install```.\n\n```bash\nnpm install image-reader-helper\n```\n\nThis library is created with TypeScript and compiled for ES6. Here is an example of use:\n\nYou can read a file using his path.\n\n```typescript\nimport {ImageReader,ImageModel} from 'image-reader-helper';\n\nlet model:ImageModel=ImageReader.read('path to your file'); \n```\n\nOr using a Buffer:\n\n```typescript\nlet buffer = fs.readFileSync('path to your file');\n\nlet model:ImageModel=ImageReader.read(buffer);\n```\n\nThe ImageModel class have this Properties:\n\n* ```width```: Image Width in pixels.\n* ```height```: Image Height in pixels.\n* ```plaette```: Array of ImageColor with all the disctint colours of the image.(Palette Color).\n* ```data```: Array with all the pixels of the image. each pixel is 4 bytes in the array ```[r,g,b,a,r,g,b,a...]```.\n\n\nThe Image Color class have this properties:\n\n* ```r```: Red value (0-255).\n* ```g```: Green value (0-255).\n* ```b```: Blue value (0-255).\n* ```a```: Alpha value (0-255).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerasul%2Fimage-reader-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerasul%2Fimage-reader-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerasul%2Fimage-reader-helper/lists"}