{"id":19783811,"url":"https://github.com/magicien/tgaimage","last_synced_at":"2025-04-30T22:31:48.062Z","repository":{"id":110286475,"uuid":"99364591","full_name":"magicien/TGAImage","owner":"magicien","description":"TGA Image Loader for Web browsers","archived":false,"fork":false,"pushed_at":"2017-08-13T02:09:03.000Z","size":995,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T04:00:07.392Z","etag":null,"topics":["javascript","tga","tga-image"],"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/magicien.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}},"created_at":"2017-08-04T17:15:13.000Z","updated_at":"2024-08-19T19:23:39.418Z","dependencies_parsed_at":"2023-04-11T08:47:39.041Z","dependency_job_id":null,"html_url":"https://github.com/magicien/TGAImage","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"f833cc3273cf99466ff877bd9b03808ea27737ec"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicien%2FTGAImage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicien%2FTGAImage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicien%2FTGAImage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicien%2FTGAImage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicien","download_url":"https://codeload.github.com/magicien/TGAImage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224225206,"owners_count":17276435,"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":["javascript","tga","tga-image"],"created_at":"2024-11-12T06:09:19.288Z","updated_at":"2024-11-12T06:09:19.858Z","avatar_url":"https://github.com/magicien.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/tgaimage.svg)](https://www.npmjs.com/package/tgaimage)\n\n# TGAImage\nTGA Image Loader for Web browsers\n\n## Install\n\n### npm\n\n```\nnpm install tgaimage --save\n```\n\n### without npm\n\n```\n\u003cscript src=\"https://cdn.rawgit.com/magicien/TGAImage/v1.0.0/tgaimage.min.js\"\u003e\u003c/script\u003e\n```\n\ntgaimage.min.js looks like this;\n```\nvar TGAImage = (function(modules){ ... })()\n```\nso once you have loaded tgaimage.min.js, you can use TGAImage as a class object.\n\n## Usage\n\n```\n// You can load a TGA image with imageWithURL function.\nconst tga1 = TGAImage.imageWithURL('lena_std.tga')\n\n// didLoad is Promise.\ntga1.didLoad.then(() =\u003e {\n\n  // You can get an img tag with 'image' property.\n  document.getElementById('colorImgTag').appendChild(tga1.image)\n\n  // You can get a canvas tag with 'canvas' property.\n  document.getElementById('colorCanvasTag').appendChild(tga1.canvas)\n})\n\n// You can also use src and onload properties like HTMLImageElement.\nconst tga2 = new TGAImage()\ntga2.onload = () =\u003e {\n  document.getElementById('grayscaleImgTag').appendChild(tga2.image)\n  document.getElementById('grayscaleCanvasTag').appendChild(tga2.canvas)\n}\ntga2.src = 'lena_std_grayscale.tga'\n```\n\n## Sample\n\n[Sample Page](https://magicien.github.io/TGAImage/sample/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicien%2Ftgaimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicien%2Ftgaimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicien%2Ftgaimage/lists"}