yashsingh1/xdaforums huggingface dataset:
[Android Themes] Kdio:
Hi Pas and ALL

Better explain the tool with an example. It's a simple one using 6 images but this is meant to be used with hundreds so ... lets see ...

If you succeeded installing the tool, a new option menu will appear as follows:

Clicking on it, the Tool Dialog window will appear

Input Folder

: Is where your source images are stored.

Output Folder

: Where the tool will generate the result images.

Restore Source Mode

: The image mode that enters (indexed, grayscale or rgb) will be the same of the output, otherwise it will be outputted as RGB.

Executing:

I've picked 6 battery icons from you:

EDIT: to turn this exequible by everyone (using GIMP), grab the icons used in the View attachment 2587369.

Edited that file with Notepad++ uncommenting just the below lines and adjusting the colorify hue/saturation parameters accordingly:

- The 1st line tells Gimp to, whenever he finds green like pixel (3), decrease the hue by -60 and increase the lightness by 15

- The 2sd line rotates the image by 180º (1)

- Save before running

When the Tool is executed, you will see this result.

Got the idea now.

As you already use PS, give GIMP a try as it is very alike PS and has these enhanced features.

Nice regards.

.
[Android Themes] mochingnawy:
very nice :good:
[Android Themes] *wii360*:
Sorry mate, I can't deal with gimp too.

The idea is great but I think (like pas2001) PS is more comfortable. I use it since nearly 10 years, and it have a lot of options.

Sorry mate
[Android Themes] Kdio:
Don't be sorry.

PS probably has it's batch processor too so you may do it there but ... if PS doesn't have, maybe you can use GIMP only to do batch things for you. ;)

For myself, GIMP is unbeatable.

Nice regards.

.
[Android Themes] xxmrgreenxx:
I use Gimp.

will try it.

great Idea Mate
[Android Themes] *wii360*:
PS have a batch processor too, and u can record your own as you edit one image/icon. It's easier for me.
[Android Themes] Kdio:
Hey xxmrgreenxx

Thank you dude for the words.

I've Ctrl+C/V almost everything there unless the .9.png safety routine that is very usefull for us indeed.

If you need any support on some functionality not yet showed on examples, please be welcome to ask ... I probably don't know the answer but we can learn together ;)

That's great! Do you think it would deal automatically with all diversity of sizes in .9.png's guidelines correctly too?

If it has not a proprietary programing language, I may give it a try to port this to it.

Nice regards.

.
[Android Themes] *wii360*:
I didn't try it, I think NO.

for .9.png I'm using xUltimate-d9pc,this tool recompile only 9.png icons, and draw9parch. Do u know the tools?
[Android Themes] Kdio:
I keep my GIMP for editing .9.png ... why change to another tool ??? Not very productive.

For compiling them back, I would like to suggest your attention to:

[tool] 9compiler - batch process for themers android

As I'm doing now ...

I place all my decompiled project graphics inside 1 folder, \app , \priv-app and \framework altogether. Run that GIMP batch with my configs. Give all that result to 9compiler ... It's all done in 5 minutes. :D

Niceeeeee....

;)
[Android Themes] *wii360*:
Thanks, It sounds better then my tools, I'll check that tomorrow.
[Android Themes] pas2001:
I same as wii360 mate use same tool and will see this too THANK
[Android Themes] Kdio:
NEW GUI

[MENTION=5282154]pas2001[/MENTION] [MENTION=5716188]*wii360*[/MENTION] [MENTION=4607905]xxmrgreenxx[/MENTION] [MENTION=5726720]mochingnawy[/MENTION] [MENTION=4894137]jlmvc[/MENTION] and all users

As you all can see at OP, I've made a little revamp in the interface. There is no more Notepad++ need. Just feed the parameters and go.

Nice regards.

Will rewrite the example later.

.
[Android Themes] CustomerWindow:
This seems cool ... downloading.
[Android Themes] xxmrgreenxx:
[MENTION=2147860]Kdio[/MENTION]

can you add a resize Option to?
[Android Themes] Kdio:
Hi xxmrgreenxx

Yep ... seems possible but would not be advisable to change android png's sizes.

Could you please exemplify? May be a can do better regarding your objective.

Nice regards.

.
[Android Themes] xxmrgreenxx:
I know it is not necessary fpr .9.png's

But can be helpfull to only resize some Battery Icons to match them on Galaxy S2.

If i resize them with Irfanview the Output Images look very strange.

Or can U make me a resize Script for Gimp?
[Android Themes] Kdio:
Sure dude ...

I got an appointment right now but will do and let you know ...

Just resize ? No crops ?

Just point your needs and I will provide.

Nice regards.

.
[Android Themes] xxmrgreenxx:
Crops?

Can u pls explain that!

i am not thaaaat PRO u think.

Only a little Thememaker
[Android Themes] Kdio:
Crop = like scissors ... you will re-dimension an image by just cutting off the edges

That may be a partial solution for the batteries ...

Did you've tried rezise the batteries in GIMP? It got a better response than Infranview ?

Nice regards.

.
[Android Themes] xxmrgreenxx:
manually tried. And it

works with only resize like a charm.

But there is no Option to create a batch.

I drop the Image info GIMP

resize it and resize the Panel to match the Iconsize.

Many Steps for one Image

edit

if i use Irfanviews Batch Prozess.

the Images look not like the original.

i Can send u an example
[Android Themes] Kdio:
This was what I've needed ...

Try it:

import os
import time
import datetime
import shutil
from gimpfu import *

pdb = gimp.pdb

#################################################
# Routine that executes the transformations
#################################################
class DoTransform:
def __init__(self):
pass
def applyMod(self, image, new_width, new_height):
layer = image.layers[0]
drawable = layer
is_indexed = pdb.gimp_drawable_is_indexed(drawable)
is_gray = pdb.gimp_drawable_is_gray(drawable)
is_rgb = pdb.gimp_drawable_is_rgb(drawable)

##################
# Scale Layer
##################
if ((new_width > 0) and (new_height > 0)):
pdb.gimp_layer_scale(layer, new_width, new_height, True)
##################

################################################
# DO NOT EDIT BELOW THIS LINE
# Harmfull - Toxic - Radioactive
################################################
def create_tree(input_folder, output_folder):
for dirpath, dirnames, filenames in os.walk(input_folder):
os.mkdir(os.path.join(output_folder, dirpath[1+len(input_folder):]))
return

def resizeProcess(input_folder, output_folder, new_width, new_height):

doTransform = DoTransform()

# Create the output folder structure
timestamp = datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d_%H-%M-%S')
output_folder = os.path.join(output_folder , timestamp)
create_tree(input_folder, output_folder)

for root, dirs, files in os.walk(input_folder):
for f in files:
inputFile = os.path.join(root, f)
filename, ext = os.path.splitext(inputFile)
outputFile = inputFile.replace(input_folder, output_folder)

# Processes only images (PNG & JPG)
# Other filetypes are copied
if (ext != ".png"):
if (ext != ".jpg"):
shutil.copy(inputFile, outputFile)
continue

is_9 = (".9.png" in inputFile)

image = pdb.gimp_file_load(inputFile, inputFile)

doTransform.applyMod(image, new_width, new_height)

pdb.gimp_file_save(image, image.layers[0], outputFile, outputFile)

double_check = False

register(
"Mr_Green_Resizer",
"Batch resizes images",
"Batch resizes images",
"Kdio",
"Kdio",
"2014",
"Mr Green Resizer...",
"",
[
(PF_DIRNAME, "input_folder", "_Input Folder", "c:/gimp/in"),
(PF_DIRNAME, "output_folder", "_Output Folder", "c:/gimp/out"),
(PF_INT, "new_width", "New Width", 0),
(PF_INT, "new_height", "New Height", 0),
],
[],
resizeProcess,
menu="<Image>/Filters",
)

main()
[Android Themes] xxmrgreenxx:
Thanks

have tried it. I forgot to tell u, that after resize i use the Sharpness 30% Filter.

But there are still differences.

left:manual resize

right: script resize
[Android Themes] Kdio:
Hi xxmrgreenxx

There are two sharpening tools in Gimp

/Filters/Enhance/Sharpen

or

/Filters/Enhance/Unsharp Mask

This last one is the most widely used and recommended function to do the job. Please do some tests with both and tell me which one gives you better results.

[MENTION=4894137]jlmvc[/MENTION] please help us here with yours Mutant Skills :D

Thank you for the ideas !!!!

Nice regards.

.
[Android Themes] jlmvc:
To be honest, I've had little time to check out your work here. :o I plan to dig in to this more on Monday. Unfortunately, I've got a steep learning curve here :)
[Android Themes] xxmrgreenxx:
[MENTION=2147860]Kdio[/MENTION]

the first one is the Filter i use.
[Android Themes] jlmvc:
[MENTION=2147860]Kdio[/MENTION] I can't keep up with all the changes :) I gave your tool a preliminary test run. Sweet! I still need to learn all it can do. I so wish I had this back when I was editing Windows 7 images. Would have saved me weeks! Honestly, before the work with the arrows, I hadn't used Gimp in ages. That might be changing now with this tool and your guidance. Really, thanks a million! :good:

Edit: Cool battery effect!
[Android Themes] Kdio:
Dude .. .tks...

The tool is meant to be used by no knowledge at all :D (as mine)

Do some experiments, throw randomly values and evaluate the results. Statistically we have a chance to output something useful before the Big Freeze (10^12 to 10^14 years).

Yep!!! :D ... I may release it if you don't earlier ;) ... Thinking in animating the normal batteries (not charging) too.

Master [MENTION=5282154]pas2001[/MENTION] will better guide us on this.

Nice regards.

.
[Android Themes] jlmvc:
I don't know if that's enough time :silly:

I think a lot of users might like it.
[Android Themes] pas2001:
Ermmm. thank to call me the variety master... But please any of u [MENTION=2147860]Kdio[/MENTION] and [MENTION=4607905]xxmrgreenxx[/MENTION] told me what happen from start . Say frankly I dont understand from the start man...
[Android Themes] Kdio:
Sorry [MENTION=5282154]pas2001[/MENTION] .. my fault .. as you don't use GIMP you can't SEE what we are talking about.

xxMrGreenxx and me developed another tool that is intended to use with batteries.

First xxMrGreenxx told me his desire to resize (scale) some battery icons to port to the S2 ...

We discussed a little about methodologies of applying sharpness to an image (in GIMP they are "Sharpen" and "Unsharp Mask") ... but this don't matter.

After that, I've thought in producing a different type of battery animation and recoded the tool to do the necessary job.

For now, the new batch tool do:

a) Resize images to new widths and heights

a) Resize images keeping old widths and heights

b) Apply Sharpeness

c) Rename the images processed.

This new tool looks like this:

With it I can produce the images necessary to that gif animation you saw with almost 4 clicks. It's all done.

Now, if you did understood a little of this, I do ask you:

1) What do you think about having that kind of battery animation I've did in the gif?

2) Do you think this tool is productive compared with what do you use today to do the same job?

Thank you for your time.

Nice regards.

.
[Android Themes] pas2001:
Thank I start to understand what both of u do

Let me answer

1) Great animation

2) This tool is very productive sure. For my job I resize with one app . Rename with another .

For sharpness I never use in making my battery icons cos my original works it size about 500 pixel and i will shrinkage it to small size when all is done. If I make with rom fumbler I will set the correct size since start so never need sharpness also.

But about 2 function in one app is enough for me to ask you that " Have chance to make it as stand alone? lol

Although only rename batch is very interesting for me if it better than the app I use now . I must separate icons to 3 sets 0-9 10-99 and 100 or it will miss in sort of icon name it will sort 0 1 10 11 12... and when it rename it will go to 0 1 2 3 4 ...

Thank for asking me :good:
[Android Themes] jlmvc:
Finally had time to give the resizer a try. Very nice too. I'll report back on the different settings when I do some more vigorous tests.

About the batch plug-in. Would it be or is it possible to only have the colors you want changed? Let's take your Battery Test zip as an example. I want to change just the green charged level to whatever color, but leave everything else alone such as the background and charging bolt. Thanks in advanced
[Android Themes] joehanh88:
very useful for GIMP'er like me :)

thanks a lot.
[Android Themes] Kdio:
Hi pas2001

Sorry but the answer is not ... The tool is just a shell that uses GIMP drawing functions to accomplish the job.

If you didn't experienced yet, I would like to suggest you the below tool for Renaming ... After searching for long, no one ever beaten it.

Bulk Rename Utility

Back to GIMP ... I would ask you again to give GIMP a try as you can see below there is no practical differences between them two.

The only REAL difference would be that: I can recommend you to DOWNLOAD and use gimp, but instead, I would have to say "Buy and use Photoshop" ... got me ? ;)

Sure ... it's already there in the 1st tool. Exactly this piece:

Same as from "GIMP/Colors/Hue-Saturation". How do you think I greenify my Yellow Minion avatars ? ;)

Hi joehanh88

Thanks for checking in :good:

If you could, please, share your experiences with it. As you can see, my themes are not that colorful limiting my practical use of the tool.

This is a working project and I would very thankful if you could contribute.

Nice regards.

.
[Android Themes] pas2001:
Thank mate I will try :D
[Android Themes] jlmvc:
I thought that's what those options were for. I finally figured out the issue :o Me! I had the Colorify option ticked as well. Very nice. Now I need to find some things to edit ;)

This is one of the most helpful things I've come across on XDA! :good::good:
[Android Themes] Kdio:
Nope ... Wrong!

The issue is ME!!! (wanna fight for it ??? :mad: )

I should had show a message saying that both were selected and stop the process.

I just have to be thankful for yours sutil way of point out my flaws ... ;)

Many (respectful) Kisses dude :victory:

.
[Android Themes] Kdio:
NO .. .again Wrong ... this is the most useful (but not in xda)

Index print or contact sheet (with exif and raw support)

Well, its function is really great but my point is about the interface he used to do the job ... Wonderful ...

Try it! Easy install ... just some extracts ...

As this tool here is getting bigger than the screen, that kind of interface will provide a way more professional look.

Let's start learn a bit more !!!

:D

.
[Android Themes] jlmvc:
No fighting, you win. The issue is you ;) Your flaw is your modesty

Thanks for the links in general. They've been quite educational
[Android Themes] Kdio:
All brand new

[MENTION=4915946]Akhilendra Gadde[/MENTION] , [MENTION=5684506]CustomerWindow[/MENTION] , [MENTION=806556]GadgetFreak[/MENTION] , [MENTION=4894137]jlmvc[/MENTION] , [MENTION=5064082]joehanh88[/MENTION] , [MENTION=5282154]pas2001[/MENTION] , [MENTION=5266065]talkingmonkeys[/MENTION] , [MENTION=4607905]xxmrgreenxx[/MENTION] , [MENTION=5716188]*wii360*[/MENTION] , [MENTION=5726720]mochingnawy[/MENTION] and [MENTION=4924814]every_one[/MENTION]_else

EDIT: [MENTION=4223026]coldmethod[/MENTION] too (sorry)

I do invite you all to review the OP as I've heavily updated the tool.

Please advise if enjoyable and we are widely open for requests.

Nice regards.

.
[Android Themes] djdarkknight96:
Really loving this! Keep up the great work!

DJ

Sent by my Klearkat Nexus 7

Free TBO Updater App

Status Report
[Android Themes] talkingmonkeys:
Couldn't agree more and I will be checking out and using this update now thank you for letting me know kdio

[MENTION=2147860]Kdio[/MENTION] I ran into a problem. When trying to convert to grayscale it doesn't work and I get this error

Traceback (most recent call last):

File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 699, in response

dialog.res = run_script(params)

File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 361, in run_script

return apply(function, params)

File "C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\KBatchProcess.py", line 178, in themeProcess

doTransform.applyMod(image, is_9, use_grayscale, rotate_angle, use_colorify, colorify_color, brightness, contrast, gauss_x, gauss_y, affected_hue, hue, lightness, saturation, use_invert, opacity)

File "C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\KBatchProcess.py", line 29, in applyMod

if (use_grayscale == True):

NameError: global name 'use_grayscale' is not defined
[Android Themes] Kdio:
Thanks T

My endless stupidity

At KBatchProcess, line 15

(-) def applyMod(self, image, is_9, [B][COLOR="Red"]convert_to[/COLOR][/B], rotate_angle, use_colorify, colorify_color, brightness, contrast, gauss_x, gauss_y, affected_hue, hue, lightness, saturation, use_invert, opacity):
(+) def applyMod(self, image, is_9, [B][COLOR="Red"]use_grayscale[/COLOR][/B], rotate_angle, use_colorify, colorify_color, brightness, contrast, gauss_x, gauss_y, affected_hue, hue, lightness, saturation, use_invert, opacity):

Re-uploading ... sorry.

EDIT: uploaded.

.
[Android Themes] talkingmonkeys:
Awesome thank you will let you know if I run into anything else. Also one small request if you can do it. Can you make that theme batch processor menu scrollable? Having problems with it fitting my screen
[Android Themes] Kdio:
I would love it too :(

Unfortunately to use a better interface, I would have to inforce the installation of GTK pyGTK modules :( ... not cool :( . At mine 768 height resolution it fits almost exactly. What I could do is split the functions in 2 windows but not sure which functions could be packed together.

As I've said WIDELY open for suggestions ;)

The decompilation ?? Did you tested?

Tks dude.

EDIT: [MENTION=5266065]talkingmonkeys[/MENTION] : Found another solution here but it too will require a non-standard GIMP install. :(

.
[Android Themes] talkingmonkeys:
Yup decompiler works great. Nice work man. :highfive:

I'm not really sure what to change in there. Unless you can just remove the part with the dog and the lightbulb?
[Android Themes] Kdio:
Hey T

Can you tell me if this new package fits your need better?

View attachment 2682780

Waiting you to update OP.

Nice regards.

.
[Android Themes] talkingmonkeys:
Perfect man. Thank you for taking the time to do this
[Android Themes] Kdio:
OP Updated (again)

- New Download Package

- Updated Screenshot

Dude

Until this moment, you are my only

customer

. I'm coding for you :cool:

Nice regards and keep complaining :D

EDIT: [MENTION=2126467]djdarkknight96[/MENTION] , [MENTION=5064082]joehanh88[/MENTION] , [MENTION=4303103]LeftyGR[/MENTION] , [MENTION=1799973]Obartuckc[/MENTION] and [MENTION=4607905]xxmrgreenxx[/MENTION] ... sorry guys ... you too please redownload the tool and reinforce the complains !!!

Thank you all.

.
[Android Themes] Bubba:
Thanks for your work. Have been using this quite a bit. A very handy tool.

Sent from my Big Ass Outlaw Phone 3
[Android Themes] Kdio:
Compiling Tool

[MENTION=2126467]djdarkknight96[/MENTION] , [MENTION=5064082]joehanh88[/MENTION] , [MENTION=4303103]LeftyGR[/MENTION] , [MENTION=1799973]Obartuckc[/MENTION] , [MENTION=4607905]xxmrgreenxx[/MENTION] , [MENTION=4412122]Bubbajoe40356[/MENTION] , [MENTION=4726059]gp545[/MENTION] , [MENTION=5266065]talkingmonkeys[/MENTION] , [MENTION=4915946]Akhilendra Gadde[/MENTION] , [MENTION=5684506]CustomerWindow[/MENTION] , [MENTION=806556]GadgetFreak[/MENTION] , [MENTION=4894137]jlmvc[/MENTION] , [MENTION=5282154]pas2001[/MENTION] , [MENTION=5716188]*wii360*[/MENTION] , [MENTION=5726720]mochingnawy[/MENTION] , [MENTION=4223026]coldmethod[/MENTION] , [MENTION=4521340]aki-saar[/MENTION] , [MENTION=5432718]SkywalkerZ[/MENTION]

Hi guys

Just another piece of the puzzle ;) ... now you can

Batch Compile yours .9.PNG's

Please, verify the OP and new download.

I think that the circle is already drawn but if you have any "segment" missing on your daily theming process that could be speeded up, please advise.

Thank you all

.
[Android Themes] djdarkknight96:
Built in 9 patch resize like with this tool:

https://code.google.com/p/9patch-resizer/downloads/list

That would finish me off...lol
[Android Themes] xxmrgreenxx:
Nice Work Mate.....

In near Future the Themes will build themself by kicking 1 Button.

You are the Man.
[Android Themes] Kdio:
Just advise me when redwarp has added the Command Line options promised and consider it done ;)

Nice regards.

.
[Android Themes] Kdio:
Reverse Engineering .9.patches

Hi all

Especially [MENTION=5282154]pas2001[/MENTION] that once expressed this need (that I had too) and I've never answered but now that it exists.

Can someone test this

.9.patch Reverse Engineering

before I publish ?

View attachment 2684698

As usual extract the contents to yours plugin folder. This package is slightly bigger as I'm uploading 7-zip.exe inside.

The tool will get any given quantity of pre-compiled .9.png's and will decompile them all.

EDIT: guys ... I need your words on this ... [MENTION=4607905]xxmrgreenxx[/MENTION] , [MENTION=5266065]talkingmonkeys[/MENTION] , [MENTION=4223026]coldmethod[/MENTION] , [MENTION=4521340]aki-saar[/MENTION]

Please comment.

Nice regards.

.
[Android Themes] pas2001:
Hmmm.. you make me difficult decision in throw away photoshop and look for gimp thank mate I will test

But you dont make for photoshop lol
[Android Themes] Kdio:
Hi newer oldest friend ;)

Unfortunately Photoshop doesn't have an easy programing tool as GIMP python-fu. And isn't free too :p

If you are willing to test the tool, please install the 1st post package together with this one.

Nice regards.

.
[Android Themes] pas2001:
Then when I ready . I need your suggestion via pm THX
[Android Themes] pas2001:
Hey how continue mate I am only none may make folder and subfolder first? thank
[Android Themes] Kdio:
Hi P

For the "Input Folder" yes, you have to create the input structure with all the apk's you want to decompile inside. If only one apk, just give the folder it is in.

The "Output Folder" is where you want the result to be placed.

Apk and Framework folders you should already have.

I've tried to stress this at the OP. Please advise if I've failed.

Nice regards.

.
[Android Themes] pas2001:
Thank i decompiled with this tool yesterday and it seem ok mate have 2 question

If i close and open gimps I must choose folder again?

and about reverse engineer... it can decompile .9png outside app?( I asked about this function mate)

BTW I will try your tool and ask more

Thank mate:D
[Android Themes] Kdio:
Hi P

Thanks for pointing out my flaws ... This bad behaviour will end soon !!!

And I only answered yesterday because it didn't existed yet. ;)

Extract with WinZip or similar direct from an apk three .9.png's of your choice and give them to the tool to see for yourself. :D

Some "Black DOS Windows" will pop up ... it's OK. Will be 3 pop ups per folder processed.

- 1st is apktool compiling

- 2sd is 7zip packing

- 3rd is apktool decompiling

You will have all of them decompiled inside the Output Folder.

Please accept this little tool as a personal gift to you.

Nice regards.

.
[Android Themes] scrappy610:
Seemingly great tool for gimp users. I am working with HTC sense, just curious if this will work for me also?
[Android Themes] Kdio:
Hi scrappy610

Even not being a GIMPer, one can benefit from the functions offered as no specific GIMP knowledge is needed. It is just the development platform used.

I will have to apologize as I'm restricted to Sammy TouchWizard Theming. I do believe that the differences will stand only in the compile/decompile processes.

If you could please state these processes steps, resources used and so, I may evaluate the changes needed to have it ready for all community.

In fact, I would be very thankful if you could do so.

Thanks.

.