(FOR PROGRAMMERS) Create a ROM apks' images resizing tool

seaskyways

Senior Member
Feb 13, 2012
574
344
0
beirut
Hello Everybody , as i have seen this would apply to ALL android phones , so i posted it here !

I have searched over the xda , and couldn't see an apk resizing tool so it could fit on smaller devices more like hdpi to mdpi ... But it is easily possible with the script i am going to provide down ... I don't know if you heard about ImageMagick tools , a whole bunch of scripts almost capable of everything for editing pictures . These scripts contain a script called mogrify.c , this script can resize images in percentages , ratios , specific length and/or width ; but featuring a rare thing to find """RESPECT FOR ALPHA""" , yes it respects alpha = the transparent parts of the image are NOT filled with white instead of staying ...


USAGE :
So for the use of this script for example.png , if example.png was hdpi , we would type in for example "mogrify -resize 75% example.png" , and then example.png would be applicable to mdpi ... another example , but this time we have a bunch of pngs which need to be resized , so the command would be "mogrify -resize 125% *.png" and fastly they will be enlarged 25% each png in the specified folder ... and so on ... note that we can type in instead of 75% or 125% , 320x480 (but this will resize the image , not resolution , so only way for resizing from hdpi to mdpi using this script is by calculating ratios and percentages , and working on their basis ...

Ok so i was thinking one of the programmers could create a GUI for a proper use for ROMS , and this wouldn't be a hard task for programmers i guess , so what i want from the programmers to in this GUI is :

1-Extract every system apk except some(not at once , in alphabatical order) (if there was exceptions)
2-Run the script as wanted using percentages (from mdpi to hdpi , from xhdpi to mdpi etc ...)
3- XMLs are left to resize , so then include workspace.xml resizing or any other xmls (totally your job , i have no idea how it works)
4-Repack the apks and push them into a copy of the ROM

By that we could partially and most importantly ported a WHOLE rom to the desired device !!

The script is down , google for Mogrify if you needed a or wanted to know more info ! wish this stickies !

WARNING !! THIS TOOL DIDN'T WORK WELL FOR ME WHILE USING BATCHES (but worked pretty nice in normal cmd.exe) , TRY TO FIND AN ALTERNATIVE !!


PLEASE include me in the credits of it , I was very tiiirreeedd so i can find such an important script !!
 

Attachments

Last edited:
  • Like
Reactions: invasion2

seaskyways

Senior Member
Feb 13, 2012
574
344
0
beirut
I am not a programmer myself , because of that i said [FOR PROGRAMMERS] , i am just a 14 year old student , but this GUI can be made like any other GUI , see like Virtous studio , it is a combination of many stuff all in one ! so this should be worth the hustle ! share it in your signitures , this will beautify the world of android !
 

dreamsforgotten

Senior Member
May 4, 2010
5,077
2,522
0
Louisiana
Just came across this and first off thank you! I'm knee deep in a project that i need to convert a whole rom from hdpi to ldpi, this is a life saver. I will pass the word on to see if anyone wants to help you with the gui !

Sent from NS4G Pool Party
 

seaskyways

Senior Member
Feb 13, 2012
574
344
0
beirut
Thanks a lot , but actually i am NOT A PROGRAMMER , so i wished if i gave a headstart , the "guys" would continue the thing ! I can't do anything from now on , i gave what i had , and now its the programmers turn !
 

dreamsforgotten

Senior Member
May 4, 2010
5,077
2,522
0
Louisiana
Thanks a lot , but actually i am NOT A PROGRAMMER , so i wished if i gave a headstart , the "guys" would continue the thing ! I can't do anything from now on , i gave what i had , and now its the programmers turn !
Yeah i got you, I'm going to see if any of my contacts want to take this on

Sent from my Sprint Galaxy Nexus

-Everything i post is opinion based on my experiences and should be taken a such.
 

seaskyways

Senior Member
Feb 13, 2012
574
344
0
beirut
This is not meant for theming , this is for resizing a whole ROM apks ... so this is very important for the android devices , lets say the Sense 3.0 was given to the mdpi htc devices , wouldn't this be cool ??
 

seaskyways

Senior Member
Feb 13, 2012
574
344
0
beirut
Yeah i know , I used this method to resize many things FOR THEMING , but i need help to spread it , I am not a recognized developer or even recognized user of anykind , so no one would look at this unless you guys spread it !
 

pulser_g2

Admin Emeritus / Senior Recognized Developer
Nov 27, 2009
19,538
11,594
113
So I am the only one concerned about such a big project ??
You made this rather confusing...

I see you attached some imagemajick code or something... But have you released something?

I don't understand from the OP if you've released something or written something, and there's no clear documentation of what's going on.
 

seaskyways

Senior Member
Feb 13, 2012
574
344
0
beirut
You made this rather confusing...

I see you attached some imagemajick code or something... But have you released something?

I don't understand from the OP if you've released something or written something, and there's no clear documentation of what's going on.
Dear Admin , No I haven't released anything , this is an Idea for the PC/Linux programmers... I have attached that file in there , so that I could make it easier for devs to accomplish what we all need , a tool to resize pngs without any loss of alpha data ... So if a Elite programmer could work on this , to decompile every apk in the system and resize all the pngs and xml files and recompile them into the ported system , then One Software would apply on all hdpi , mdpi , ldpi , xhdpi etc ! get it or still not yet clear ??