npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gh-image-transformer

v0.2.2

Published

Generate image to TextMesh Pro Rich-Text

Downloads

5

Readme

gh-image-transformer

This CLI does not only transform images into TextMesh Pro Rich-Text tags for Grey Hack but also creates animation frames out of GIFs which are usable in Grey Hack.

Install

npm install -g gh-image-transformer

Usage

Image transformer

Usage: gh-image-transformer [options] <filepath> [width] [height]

Transform images to TextMesh Rich-Tags output for Grey Hack.

Arguments:
  filepath                                  image to transform
  width                                     output width of image
  height                                    output height of image

Options:
  -V, --version                             output the version number
  -o, --output-directory <outputDirectory>  output directory
  -s, --scale <number>                      scale of output
  -wa, --without-alpha                      ignore alpha channel
  -h, --help                                display help for command

Animation transformer

Usage: gh-animation-transformer [options] <filepath> [width] [height]

Transform GIFs to TextMesh Rich-Tags output animation frames for Grey Hack.

Arguments:
  filepath                                  image to transform
  width                                     output width of image
  height                                    output height of image

Options:
  -V, --version                             output the version number
  -o, --output-directory <outputDirectory>  output directory
  -s, --scale <number>                      scale of output
  -wa, --without-alpha                      ignore alpha channel
  -d, --delay <number>                      delay between frames
  -h, --help                                display help for command

How to

Static Image

Static images can be simply transformed into TextMesh Pro Rich-Text tags by using:

gh-image-transformer path/to/image.png

Optionally you can also select the width and height. By default, it will resize the image by a width of 64px. If you want to resize the image by height just place a -1 at the spot of the width.

Keep in mind that the images should be kept below 100px since Grey Hack has a limit of 160000 characters for each print line. Anything above that may cause the image to be displayed incorrectly.

Via the additional options, you can also change the scale of each pixel by default that value is 2. It is not recommended to go lower since that will cause vertical space between lines.

GIF

GIFs can be transformed into TextMesh Pro Rich-Text tags animation frames by using:

gh-animation-transformer path/to/image.gif

The options of the animation transformer are the same as the ones from the normal image transformer. There is only one additional option which is about the delay between each frame.

Note: It is highly recommended to use either greybel-js or greybel-vs to import animations otherwise you end up with a lot of copy paste depending on how many frames the GIF got.

In case you are using greybel-js you just need to execute greybel path/to/image.src. It is recommended to use the --create-ingame flag to avoid copy-pasting all the files.

If you are using greybel-vs you just need to right click on the image.src and select build. To make it more convenient please make sure to activate the create-ingame option.

Example output

Example output

Example animation output