nine_patcher 1.0.1 copy "nine_patcher: ^1.0.1" to clipboard
nine_patcher: ^1.0.1 copied to clipboard

A command line tool to creates nine-patch JSON metadata files.

Nine Patcher #

A command line tool to creates nine-patch JSON metadata files, for use with this Flutter package.

Workflow #

  • Create a nine-patch file at high resolution, with the appropriate nine-patch border.
  • Run:
dart run nine_patcher path/to/image.9.png output/dir 

This will take the image.9.png and create two files in output/dir:

  1. image.png the plain image without the nine-patch border.
  2. image.9.json the metadata for the nine-patch border in JSON format.

If the file is of the format path/to/Nx/image.9.png (where Nx could be say 4x) then Nx is assumed to be the scale and added to the metadata to aid in rendering resolution independent assets.

Example #

dart run nine_patcher examples/4.0x/box_orange_rounded.9.png
0
likes
140
pub points
49%
popularity

Publisher

verified publisherbramp.net

A command line tool to creates nine-patch JSON metadata files.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

args, image, json_annotation, nine_patch_common, path

More

Packages that depend on nine_patcher