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 !!
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
-
284.4 KB Views: 61
Last edited: