Jump to content

Theme Advice


Guest youngsta2010

Recommended Posts

Guest youngsta2010

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
Link to comment
Share on other sites

Guest R_Bachman

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).

Link to comment
Share on other sites

Guest Mushroom_Lord

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 :)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Guest R_Bachman

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.

Link to comment
Share on other sites

Guest Mushroom_Lord

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.