{"id":14036549,"url":"https://github.com/hhsnopek/tomify","last_synced_at":"2025-06-21T03:35:14.774Z","repository":{"id":68718352,"uuid":"98347019","full_name":"hhsnopek/tomify","owner":"hhsnopek","description":"Replace faces in image(s) with Tom wiggle or your own Gif!","archived":false,"fork":false,"pushed_at":"2017-07-26T15:45:25.000Z","size":15576,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T10:51:21.396Z","etag":null,"topics":["face-recognition","gif-creator","opencv"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tomify","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/hhsnopek.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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}},"created_at":"2017-07-25T20:26:09.000Z","updated_at":"2024-10-03T13:01:54.000Z","dependencies_parsed_at":"2023-03-08T23:31:07.602Z","dependency_job_id":null,"html_url":"https://github.com/hhsnopek/tomify","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hhsnopek/tomify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhsnopek%2Ftomify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhsnopek%2Ftomify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhsnopek%2Ftomify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhsnopek%2Ftomify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hhsnopek","download_url":"https://codeload.github.com/hhsnopek/tomify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhsnopek%2Ftomify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261057673,"owners_count":23103700,"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":["face-recognition","gif-creator","opencv"],"created_at":"2024-08-12T03:02:02.140Z","updated_at":"2025-06-21T03:35:09.760Z","avatar_url":"https://github.com/hhsnopek.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Tomify\n\u003e Replace faces in an image with Tom wiggle or your own Gif!\n\n![tomified](examples/tomified.gif)\n\n## Requirements\n- [Imagemagick](//www.imagemagick.org)\n- [OpenCV](//opencv.org/downloads.html) v2.4.x \n\n## CLI Usage\n```\n  Replace faces in image(s) with Tom wiggle or your own Gif!\n\n  Usage: $ tomify \u003cimage\u003e\n\n  Options:\n    --output, -o Output Path, default: $PWD\n    --resize, -r Resize Tom, default: 1 (Number)\n    --debug, -d Debug Mode, default: false\n    --gif, -g Gif Path, default: tom-wiggle.gif\n    --help, -h Display Help\n    --version Display Version\n\n  Examples:\n    $ tomify image.jpg\n        # process single image and save to $PWD/image.gif\n\n    $ tomify person1.jpg person2.jpg --output ./new-folder\n        # process multiple images, and saves to ./new-folder\n```\n\n## Internal API\n### Usage\n#### Replace all faces in a gif with your own gif\n```\nconst gif = 'path/to/custom.gif'\nconst file = 'image/with/faces.jpg'\nconst dest = 'path/to/output.gif'\nconst resize = 1\n\nreplaceAll({ file, dest, resize, gif })\n  .then(() =\u003e {\n    console.log('Done!')\n  })\n  .catch(err =\u003e {\n    console.error('Uh oh!')\n    console.error(err)\n  })\n```\n\n### Reference\n#### replaceAll\n```\n// Find and replace all Faces with gif\nasync function replaceAll({ file, dest, resize })\n\n  // Params\n  Object\n    file = Filepath\n    dest = Filepath\n    resize = Integer\n```\n\n#### addGifs\n```\n// Adds a Gif to all all positions\nasync function addGifs({ dest, file, positions })\n\n  // Params\n  Object\n    dest = Filepath\n    file = Filepath\n    positions = Array of Objects\n      Object - {file, x, y, height, width, gif} // see createQuery for details\n```\n\n#### createQuery\n```\n// Creates an imagemagick query, used internally in addGifs\nfunction createQuery({ file, x, y, height, width, gif })\n\n  // Params\n  Object\n    file = Filepath\n    x = Integer\n    y = Integer\n    height = Integer\n    width = Integer\n    gif = Filepath\n\n  // Returns Formatted Array\n```\n\n#### detect\n```\n// Async Detect - returns Promise\nfunction detect(file)\n\n  // Params\n  file = Filepath\n\n  // Returns\n  Object\n    faces = Array of Face (See faced)\n    image = Matrix\n    file = Filepath\n```\n\n#### debug\n```\n// Enables logging if environment variable TOMIFY_DEBUG is 'true'\n// note: this is just a small wrapper to console.error\nfunction debug(msg, ...args)\n\n  // Params\n  msg = String\n  ...args\n```\n\n## Known Issues\n- Running macOS 10.12 (Sierra)? See: https://github.com/Homebrew/homebrew-science/issues/4303\n\n## License\n[MIT](license.md) © [Henry Snopek](//hhsnopek.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhhsnopek%2Ftomify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhhsnopek%2Ftomify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhhsnopek%2Ftomify/lists"}