{"id":16693853,"url":"https://github.com/deepsweet/itc","last_synced_at":"2025-07-13T22:08:07.789Z","repository":{"id":57278408,"uuid":"43864821","full_name":"deepsweet/itc","owner":"deepsweet","description":"iTunes ITC files parser and covers extractor","archived":false,"fork":false,"pushed_at":"2019-05-10T20:48:06.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T23:11:18.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/deepsweet.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}},"created_at":"2015-10-08T05:25:22.000Z","updated_at":"2023-05-04T11:45:22.000Z","dependencies_parsed_at":"2022-09-18T18:29:28.078Z","dependency_job_id":null,"html_url":"https://github.com/deepsweet/itc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deepsweet/itc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fitc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fitc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fitc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fitc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepsweet","download_url":"https://codeload.github.com/deepsweet/itc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsweet%2Fitc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265212825,"owners_count":23728608,"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":"2024-10-12T16:32:40.855Z","updated_at":"2025-07-13T22:08:07.768Z","avatar_url":"https://github.com/deepsweet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/itc.svg?style=flat-square)](https://www.npmjs.com/package/itc)\n[![travis](http://img.shields.io/travis/deepsweet/itc.svg?style=flat-square)](https://travis-ci.org/deepsweet/itc)\n[![deps](http://img.shields.io/david/deepsweet/itc.svg?style=flat-square)](https://david-dm.org/deepsweet/itc)\n\nWIP.\n\n## Install\n\n```\nnpm i -S itc\n```\n\n## Usage\n\n```js\nimport path from 'path';\nimport fs from 'fs';\nimport ITC from 'itc';\n\nconst itcFilePath = path.resolve('./test.itc');\nconst itc = new ITC(itcFilePath);\n\nitc.extractImages().then(images =\u003e {\n    console.log(images);\n    /*\n    [\n        {\n            info: {\n                filename: './test.itc',\n                type: 'png',\n                itemSize: 65732,\n                width: 128,\n                height: 128,\n                start: 480,\n                size: 65536\n            },\n            raw: \u003cBuffer\u003e\n        },\n        {\n            info: {\n                type: 'png',\n                itemSize: 262340,\n                width: 256,\n                height: 256,\n                start: 66212,\n                size: 262144\n            },\n            raw: \u003cBuffer\u003e\n        },\n        {\n            info: {\n                type: 'png',\n                itemSize: 640196,\n                width: 400,\n                height: 400,\n                start: 328552,\n                size: 640000 },\n                raw: \u003cBuffer\u003e\n            },\n            raw: \u003cBuffer\u003e\n        }\n    ]\n    */\n\n    images.forEach(image =\u003e {\n        fs.writeFile(\n            `${image.info.width}-test.${image.info.type}`,\n            image.raw\n        );\n        /*\n        .\n        ├── test.itc\n        ├── 128-test.png\n        ├── 256-test.png\n        └── 400-test.png\n        */\n    });\n});\n```\n\n## API\n\n### `getImageOffset(itemOffset = 0)`\n\n```js\nitc.getImageOffset().then(imageOffset =\u003e console.log(imageOffset));\n// \u003cNumber\u003e\n```\n\n### `getImageType(itemOffset = 0)`\n\n```js\nitc.getImageType().then(imageType =\u003e console.log(imageType));\n// \u003cString\u003e: 'png' || 'argb' || 'jpg'\n```\n\n### `getItemSize(itemOffset = 0)`\n\n```js\nitc.getItemSize().then(itemSize =\u003e console.log(itemSize));\n// \u003cNumber\u003e\n```\n\n### `getImageStart(itemOffset = 0)`\n\n```js\nitc.getImageStart().then(imageStart =\u003e console.log(imageStart));\n// \u003cNumber\u003e\n```\n\n### `getImageSize(itemOffset = 0)`\n\n```js\nitc.getImageSize().then(imageSize =\u003e console.log(imageSize));\n// \u003cNumber\u003e\n```\n\n### `getImageWidth(itemOffset = 0)`\n\n```js\nitc.getImageWidth().then(imageWidth =\u003e console.log(imageWidth));\n// \u003cNumber\u003e\n```\n\n### `getImageHeight(itemOffset = 0)`\n\n```js\nitc.getImageHeight().then(imageHeight =\u003e console.log(imageHeight));\n// \u003cNumber\u003e\n```\n\n### `getImageInfo(itemOffset = 0)`\n\n```js\nitc.getImageInfo().then(imageInfo =\u003e console.log(imageInfo));\n/*\n{\n    filename: \u003cString\u003e,\n    type: \u003cString\u003e,\n    itemSize: \u003cNumber\u003e,\n    width: \u003cNumber\u003e,\n    height: \u003cNumber\u003e,\n    start: \u003cNumber\u003e,\n    size: \u003cNumber\u003e\n}\n*/\n```\n\n### `getImagesInfo()`\n\n```js\nitc.getImagesInfo().then(imagesInfo =\u003e console.log(imagesInfo));\n/*\n[\n    {\n        filename: \u003cString\u003e,\n        type: \u003cString\u003e,\n        itemSize: \u003cNumber\u003e,\n        width: \u003cNumber\u003e,\n        height: \u003cNumber\u003e,\n        start: \u003cNumber\u003e,\n        size: \u003cNumber\u003e\n    },\n    ...\n]\n*/\n```\n\n### `extractImage(imageInfo)`\n\n```js\nitc.extractImage({ ... }).then(image =\u003e console.log(image));\n/*\n{\n    info: {\n        filename: \u003cString\u003e,\n        type: \u003cString\u003e,\n        itemSize: \u003cNumber\u003e,\n        width: \u003cNumber\u003e,\n        height: \u003cNumber\u003e,\n        start: \u003cNumber\u003e,\n        size: \u003cNumber\u003e\n    },\n    raw: \u003cBuffer\u003e\n}\n*/\n```\n\n### `extractImages()`\n\n```js\nitc.extractImages().then(images =\u003e console.log(images));\n/*\n[\n    {\n        info: {\n            filename: \u003cString\u003e,\n            type: \u003cString\u003e,\n            itemSize: \u003cNumber\u003e,\n            width: \u003cNumber\u003e,\n            height: \u003cNumber\u003e,\n            start: \u003cNumber\u003e,\n            size: \u003cNumber\u003e\n        },\n        raw: \u003cBuffer\u003e\n    },\n    ...\n]\n*/\n```\n\n## References\n\n* [itcToImageV2.sh](https://github.com/kyro38/MiscStuff/blob/master/Useless/itc/itcToImageV2.sh)\n* [ITC Extractor](http://www.sffjunkie.co.uk/python-itc.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepsweet%2Fitc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepsweet%2Fitc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepsweet%2Fitc/lists"}