Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expand only expands if both dimensions are larger than original #2

Open
jacobweber opened this issue Nov 27, 2013 · 0 comments
Open

Comments

@jacobweber
Copy link

If you use -expand, you have to specify that both dimensions are 2px larger than the largest dimension of the original 9-patch image. For example, if the original is 642x962, running -expand 650x1000 will give an error:

$ 9pedit -expand 650x1000 -out out splash.9.png
Will save images to out
--> Processing file splash.9.png
  - Image is 642x962 pixels
  + Expand 9-patch to 650x1000
Exception in thread "main" java.lang.IllegalArgumentException: Attempt to expand image by a negative amount
    at net.rcode.npedit.NinePatchImage.expand(NinePatchImage.java:169)
    at net.rcode.npedit.ExpandEditCommand.performEdit(ExpandEditCommand.java:23)
    at net.rcode.npedit.NinePatchEdit.applyCommand(NinePatchEdit.java:161)
    at net.rcode.npedit.NinePatchEdit.processFile(NinePatchEdit.java:144)
    at net.rcode.npedit.NinePatchEdit.processFiles(NinePatchEdit.java:166)
    at net.rcode.npedit.NinePatchEdit.main(NinePatchEdit.java:175)
@drbild drbild mentioned this issue Aug 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant