Commits

Hugo Visser committed 894b8a4

Add readme and unlicense file.

  • Participants
  • Parent commits aa3ba2d

Comments (0)

Files changed (2)

+README
+------
+9tool is a simple command line tool to make it a little bit easier to work with Android nine patch (.9.png) files.
+
+The main use case is to copy the nine patch area from one nine patch file to another one, which may also be a plain .png file. When you copy the nine patch area to a normal .png it becomes a .9.png.
+
+9tool has some crude dpi detection and will scale the nine patch area from different densities. The detection currently works by looking at the folder name, but it's also possible (or required) to specify the dpi on the command line.
+
+9tool can also strip the nine patch area to create a normal .png from a .9.png file.
+
+Quick usage
+-----------
+It's recommended that you add 9tool to your system path. 9tool has two commands, either *copy* or *png*.
+
+Here are some examples:
+
+<pre>
+9tool copy source.9.png dest.png
+</pre>
+
+Would copy the nine patch area from source.9.png to dest.png. After copying dest.png will be renamed to dest.9.png. 
+
+<pre>
+9tool copy drawable-xhdpi/source.9.png drawable-mdpi/source.9.png
+</pre>
+
+Same as above, but would scale down the nine patch area, assuming that source.9.png are the same image asset (there's no checking!). If the destination source.9.png does not exist, it will be created based on a scaled down version of the source file.
+
+<pre>
+9tool png patch.9.png
+</pre>
+
+Would "unpatch" patch.9.png and rename it to patch.png.
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>