• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.
Sign in to follow this  
Followers 0

Theme Advice

8 posts in this topic

Posted (edited)

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
0

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted

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

0

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.