Jump to content


Photo

Theme Advice

- - - - -

  • Please log in to reply
7 replies to this topic

#1
youngsta2010

youngsta2010

    Enthusiast

  • Members
  • PipPipPip
  • 179 posts
  • Gender:Male
  • Location:Tamworth, UK
  • Devices:ZTE Blade, JoyTAB, Moto G 8GB
Hi I've been trying to make a theme for the moldovan ROM and have run into issues, everything FC's. Basically all I'm trying to do is edit the PNG's so my questions are should I decompile the apk's or extract them and also once I've edited them should I convert them to indexed or can I leave them as RGB? My images always end up messed up when I convert them back to indexed. I'm using gimp to edit the PNG's. Any help anyone can offer would be great, thank you.

Edit: Also I have swapped some images with those from another theme as well as edited some.

Edited by youngsta2010, 10 December 2011 - 06:08 PM.

  • 0

#2
R_Bachman

R_Bachman

    Newbie

  • Members
  • Pip
  • 28 posts
  • Devices:ZTE-Blade

Hi I've been trying to make a theme for the moldovan ROM and have run into issues, everything FC's. Basically all I'm trying to do is edit the PNG's so my questions are should I decompile the apk's or extract them and also once I've edited them should I convert them to indexed or can I leave them as RGB? My images always end up messed up when I convert them back to indexed. I'm using gimp to edit the PNG's. Any help anyone can offer would be great, thank you.

Edit: Also I have swapped some images with those from another theme as well as edited some.


All you need to do is to replace the .png's(i use winrar), with .png's of the same size (be sure the name is the same).

If the files are .9png's you need to edit them and convert them back to .9png's ,
with the draw9patch tool(if you have sdk installed, its in the tools folder).

  • 1

#3
youngsta2010

youngsta2010

    Enthusiast

  • Members
  • PipPipPip
  • 179 posts
  • Gender:Male
  • Location:Tamworth, UK
  • Devices:ZTE Blade, JoyTAB, Moto G 8GB
Thanks, so do you extract the images with winrar or decompile the apk first?

  • 0

#4
JudasLucifer

JudasLucifer

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,342 posts
  • Gender:Male
  • Devices:Zte Blade

Thanks, so do you extract the images with winrar or decompile the apk first?


Really, its best to decompile using Apktool first, and essential when working with 9.png's
9.png's are png's which are spilt in to 9 (in three rows of three).
The center patch can be stretched by the system horizontally and vertically to fit to the applications desired size.
The corners may not be stretched, and the patches on the edge only either horizontally OR vertically, depending on their placement.

When compiled, these look like normal PNG files in an image editor.

Decompiled, the entire image has a 1px transparent border. Along two or for more complex png's 4 sides, black #ffffff pixels determine where the patches are. Any other colour along this border will make the apk fail to compile.

RGB/greyscale/indexing has never effected me before, though I use the theme engine iin cyanogenmod, so it may be different in your case, though I sincerely doubt it.
Always make sure you replace the image file you are theming, never leave anything missing.
Make the files you replace the same size in pixels as the original
Sign your apk (though this is not necessarily needed for framework files)

Sources: experience :P

Any other questions feel free to ask :)

  • 0

Sig.png


What Font Are You Using? (thats legible of course :P)


 


#5
flshg

flshg

    Addict

  • Members
  • PipPipPipPipPip
  • 552 posts
  • Gender:Male
  • Location:HK
  • Devices:Nexus 4

black #ffffff pixels determine where the patches are. Any other colour along this border will make the apk fail to compile.


Do you mean black #ff000000 ?


I've never fully understood 9 patches. Are these 9 patches different to normal pngs internally - so if I create a png button, then add a 1px transparent border, black pixels as necessary, would this still be classed as a correct 9 patch, or do I have to use a specific editor?


  • 0
flsh grdn


...................................................................................................................................................................................

ZTE Blade / Orange San Francisco Grey

Running Eco CM9

#6
R_Bachman

R_Bachman

    Newbie

  • Members
  • Pip
  • 28 posts
  • Devices:ZTE-Blade

Thanks, so do you extract the images with winrar or decompile the apk first?


If you just change the .png's, you don't need to decompile.Extract, edit (convert the 9.png's as i told you in the previous post) and put the files back in to replace the old ones.

  • 0

#7
JudasLucifer

JudasLucifer

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,342 posts
  • Gender:Male
  • Devices:Zte Blade

Do you mean black #ff000000 ?


I've never fully understood 9 patches. Are these 9 patches different to normal pngs internally - so if I create a png button, then add a 1px transparent border, black pixels as necessary, would this still be classed as a correct 9 patch, or do I have to use a specific editor?



Woops, sorry, I do mean #000000 :P
Think of 9pngs as coming in two forms; compiled and decompiled.


yes, you can do that to a decompiled png (or any other image file) in your image editor, just add the black dots to where you want the centre patch to be (hard to explain with out a picture, but you soon get used to it, another google may help).
Any editor will do, I personally use GIMP.
Then name the file file_name.9.png...

Compile it using apktool and the resulting (compiled) 9.png will look like a normal png (minus the borders and dots of the 9png) but still retaining the data as how how it stretches.

  • 0

Sig.png


What Font Are You Using? (thats legible of course :P)


 


#8
flshg

flshg

    Addict

  • Members
  • PipPipPipPipPip
  • 552 posts
  • Gender:Male
  • Location:HK
  • Devices:Nexus 4

yes, you can do that to a decompiled png (or any other image file) in your image editor, just add the black dots to where you want the centre patch to be (hard to explain with out a picture, but you soon get used to it, another google may help).
Any editor will do, I personally use GIMP.
Then name the file file_name.9.png...

Compile it using apktool and the resulting (compiled) 9.png will look like a normal png (minus the borders and dots of the 9png) but still retaining the data as how how it stretches.

Ah thanks, that clears things up.



  • 0
flsh grdn


...................................................................................................................................................................................

ZTE Blade / Orange San Francisco Grey

Running Eco CM9




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users