1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

How do you edit a .9.png file?

Discussion in 'Android Themes' started by skylordusa1, Nov 11, 2010.

  1. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Is this a hard process? All I really want to do is take the statusbar .9.png files and change there color from black to one of my choice. I am using photoshop but it seems that the file is locked and will not let me change the color. Is there a step I am missing? Can someone give a quick write up on how to edit these files? Thank you in advance.
  2. Benny879
    Offline

    Benny879 New Member

    Joined:
    Dec 16, 2009
    Messages:
    686
    Likes Received:
    0
    Trophy Points:
    0
    Its not as easy as just changing the color. All 9.png's must be compiled through eclipse after setting up your guides using the draw9patch app that comes with the Android SDK.
  3. droidman101
    Offline

    droidman101 New Member

    Joined:
    Feb 25, 2010
    Messages:
    711
    Likes Received:
    0
    Trophy Points:
    0
    or you can just use gimp and skip those steps ;)
  4. nmiltner
    Offline

    nmiltner Premium Member Theme Developer Premium Member

    Joined:
    Jan 19, 2010
    Messages:
    285
    Likes Received:
    5
    Trophy Points:
    0
    Location:
    Fort Wayne, IN
    How do u compile and ass the guides in gimp, is there a plug in? I've been using apk tool to decompile the apk, edit the .9 in gimp, recompile in apk tool.

    Sent from my Droid using DroidForums App
  5. CorCor67
    Offline

    CorCor67 Premium Member Premium Member Developer

    Joined:
    May 2, 2010
    Messages:
    438
    Likes Received:
    2
    Trophy Points:
    0
    In site FAQ you will find this ( http://www.droidforums.net/forum/droid-faq/51442-how-edit-9-pngs.html )...There are a few different ways, if you know how to use eclipse its much easier...but if you dont it'll take you twice as long learning eclipse...this tells you how to skip eclipse and run a different program, but if you plan to keep modding you should take the time to learn eckipse


    Last edited: Nov 12, 2010
  6. johnnyb15613
    Offline

    johnnyb15613 Theme Developer Theme Developer

    Joined:
    Apr 16, 2010
    Messages:
    259
    Likes Received:
    2
    Trophy Points:
    0
    I have edited many .9.png files. its not that hard at all!
    Open the file you want to edit in your favorite image editing program.
    Copy the file and make a brand new image thats EXACTLY the same size (in pixels)
    Draw your image and save it as the same file name EXCLUDING the.9
    (eg: statusbar_background.9.png woyuld be saved as statusbar_background.png)
    Now you must open your android SDK Tools folder and run the draw9patch.bat file.
    After the 9patch editor opens, drag the file you created into the program.
    The editor adds a pixel to the Top, Bottom, Right, and Left of your image.
    Right - Where text and pics are displayed
    Bottom - Where text and pics are displayed
    Left - Where the image should be stretched
    Top - Where the image should be stretched
    ( I am creating a tutorial for this.....should be done within a week)

    After picking the patch areas, save the file. This step adds the .9.png extension to the file.

    Now (using Xultimate's 9 patch tools) insert the file into the example1/res/drawable-hdpi folder
    (Heres where mine is located) (C:\SDK\tools\example1\res\drawable-hdpi)

    Now run xUltimate-d9pc.exe

    After completed, your image will be in the done folder.
    Place image inside apk and enjoy!

    Tutorial coming soon
  7. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Wow ok that sounds like a process. hahahahaaha. If you could post the link to the tutorial here or let me know where you created it. I always have an easier time when I have a guide/steps to follow. Thanks alot for the information guys.
  8. CorCor67
    Offline

    CorCor67 Premium Member Premium Member Developer

    Joined:
    May 2, 2010
    Messages:
    438
    Likes Received:
    2
    Trophy Points:
    0

    I must be typing in invisible color

    TUTORIAL
    http://www.droidforums.net/forum/droid-faq/51442-how-edit-9-pngs.html
  9. Jim 777
    Offline

    Jim 777 Active Member

    Joined:
    Dec 26, 2009
    Messages:
    2,270
    Likes Received:
    2
    Trophy Points:
    38
    Since I can't get SDK to work for me, I use Photoshop (don't know Gimp) and Xultimate... no eclipse. Working pretty good. No links but do a Google search and you'll find what I found.

    You need to change the Mode of the image then you can make your changes. Image>Mode>RGB Color
  10. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Hey thanks for the link to your guide CorCor. I did read through it but its a little advanced for me. Im new to all this theming stuff. I would love to make my own theme but I always have trouble decompling/recompiling using apk manager 4.8 and 4.9. I hate to give up on things but I just dont know enough about xml and all this stuff. Im basically at the point where I can open up the rom.zip and swap out the regular pngs in framework-res.apk with my own pngs like a wiz. hahahahahha But pretty much everything else I try like editing the xmls after decompiling and then recompiling always ends up in a boot loops. So this may just be to much for me to continue with. I appreciate you and the other members on here like you who take time out of there day to post guides for noobs like me. Im sure your guide helped a ton of other people. Its just sometimes the guides are written as if the people reading them already no most of the stuff. Thats why I like to see a bunch of guides cause some go into more detail in certain areas then others.

    I really wrote this thread cause All I wanted to do is change the color of the statusbar_background.9.png to a different color didnt want to mess with the guides/resize/any of that so didnt know if there was a simple way using say photoshop/gimp/paint or no matter what you want to do with a .9.png you have to go through this process. Thanks again for your help and guidance I really appreciate it and Im sure others do as well.
  11. CorCor67
    Offline

    CorCor67 Premium Member Premium Member Developer

    Joined:
    May 2, 2010
    Messages:
    438
    Likes Received:
    2
    Trophy Points:
    0
    Reading that again, I sound like an ***hole...didn't mean it in a rude way.

    If all you need it for is the status_bar_background.9.png just make a new file 480x720 I never patch that one...
  12. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Ok wow awesome this is a step forward Jim. I did what you said and changed the mode to RGB. I am now able to change the color of the bar. This is great. But I am scared to hear the rest I think hahahahaha. Now that I have the color I want. Can I just (please say yes, please say yes) save the file now and add it back to the framework/drawable folder and tada im done? Or do I now have to do the thing with the patch 9/add guides?

    Thanks alot for your help im super siked that I was atleast able to get it unlocked and color changed thanks to you.
  13. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Hey no way CorCor you dont sound like an ***hole. I appreciate you even responding at all. I know it must be hard for you guys who know what your doing to be on here explaining the same things over and over and over again to dummies like me.

    I dont know if you saw my last post but Jim showed me how to change the color of the stat bar png in photoshop. I see you say you never patch that png. So now that I have the color I want. Can I just save it and boom away we go I finally got something to work right with my phone? hahahahah Or no I have to do something else first?
  14. Jim 777
    Offline

    Jim 777 Active Member

    Joined:
    Dec 26, 2009
    Messages:
    2,270
    Likes Received:
    2
    Trophy Points:
    38
    Since off hand I'm not knowing exactly what file you're working on, but if it "stretches" from it's original state, then most likely it will not work if you just put it back in.

    You can actually create the "guides" in PS and use Xultimate to create the final .9.png for your apk. Xultimate can be downloaded from here.

    Xultimate
  15. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    statusbar_background.9.png is the file I am working on. Still need xultimate for that? Im trying to stay away from creating the guides myself cause I have no idea about that.
  16. Jim 777
    Offline

    Jim 777 Active Member

    Joined:
    Dec 26, 2009
    Messages:
    2,270
    Likes Received:
    2
    Trophy Points:
    38
    PM sent ;)
  17. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Well after following jims advice and changing the mode to rgb in photoshop I was able to change the color. I then went ahead and changed the colors of all the statusbar.9.pngs and figured I would give them a shot. I swapped them out and installed the rom. Somebody say Boom Boom Boom well I'm about to say wayooo. Hahahahah. It worked perfect. I now have the whole drop down themed the way I want it. First time I got anything to work on my phone with edits without bootlooping. Thanks again jim and everyone else who tried to help. I love this forum. I will post a pic once I get a chance to drocap it.

    Sent from my Droid using DroidForums App
  18. Patriotvirus
    Offline

    Patriotvirus New Member

    Joined:
    Oct 5, 2010
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Fresno, CA
    When I open up draw9patch I get this:

    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesktop/swingworker/SwingWorker
    at com.android.draw9patch.Application$1.run(Application.java:48)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.ClassNotFoundException: org.jdesktop.swingworker.SwingWorker
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 9 more

    I upgraded to Android SDK Tools r8 yesterday.

    EDIT: I got it working. It seems as though it was missing swing-worker-1.1.jar file
    Last edited: Dec 7, 2010
Search tags for this page
.9 thread file
,
9 patch editor.apk
,
9 patch png design in photoshop
,
9patch colour apk
,
can you resize a compiled .9.png
,
change color 9.png
,
edit .9 png with gimp
,
edit 9 patch eclipse
,
fastest to edit and patch .9 png
,
how to change color of .9 png and patch
,
how to edit .9 files
,
how to edit and patch .9 in photoshop
,
statusbar background.9.png trong suốt hdpi
,
statusbar.9.png
,

xultimate-d9pc