[TOOL][WINDOWS][.PNG][.9.PNG] Android Drawable Resizer Tool

Search This thread

regaw_leinad

Inactive Recognized Developer
Jan 30, 2010
3,667
3,784
Seattle, WA
www.regawmod.com
A great app for developers! Would need this for a widget of mine ^^

Anyway, on startup, I received an error.
Length cannot be less than zero.
Parameter name: length
Code:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at Android_Drawables_Resizer.Main.wc_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e)

Yup, that's because his server where he hosts the update xml is down, and there is no error-checking in the code for that :\
 

~RoN~

Member
Apr 3, 2013
32
79
Looks awesome! Good work! That being said, you should probably be careful distributing the ComponentFactory.Krypton.Ribbon.dll because it's not free and you use it's KryptonGallery control... But I'm not judging lol. Just be careful! :)

Also, I think you should put in some exception handling for your updating. Your web host's server's CPU limit was reached and nothing can connect to it right now, thus throwing an ArgumentOutOfRangeException when it tries to parse the downloaded update info.

You could also check out my .NET updater tutorial on YouTube if you want to implement that into this project - HERE

Hi
I didn't notice the KryptonGallery is not free. I have already changed this control.
Also, I am now going to fix the exception handling in the update process.
For some reason the CPU limit reached error is shown from time to time, even though the traffic in my website is minimal...
Thanks for the comments :good:
 
Last edited:
  • Like
Reactions: regaw_leinad

~RoN~

Member
Apr 3, 2013
32
79
thanks a bunch needed something like this to help transfer my s3/n2 theming into my note 10.1 rom :) this seems like it will be perfect for the job any chance of a linux version in the future? if not no biggie thats what vm's are for

I am now installing ubuntu just because of you :laugh:. It will also be a good opportunity for me to explore linux
 
Last edited:

~RoN~

Member
Apr 3, 2013
32
79
Is this compatible with xxhdpi
Sent from my 5th Dimension eVo 3D
*Team 420 band of Misfits*
Not yet, I will soon add it. It is quite simple
So this software can resize .9.PNGs without any errors?? With the placers at the correct positions??
Yes. There shouldn't be any problems. The software refer to .9.PNGs as regular PNGs, and it just scales the images. The placers' positions shouldn't change.
 
Last edited:

~RoN~

Member
Apr 3, 2013
32
79
I want to ask those who downloaded the tool:
Is the current drawbale gallery O.K, or should I look for a better one?
 
Last edited:

brolee93

Senior Member
Jan 1, 2009
1,968
523
37
XDA city
Decompiled, of course. but I can add decompiling and compiling to the process...

OK thanks for reply my bro I go to test 'ew with decompiled. 9 :). Thanks for reply :D.

You sure your soft don't lost quality when I resize xhdpi folder to hdpi or mdpi? Because when I use other soft for resize a lot of png I have bad quality png :( (when I have xhdpi and I want reduce to hdpi or mdpi)...
 

~RoN~

Member
Apr 3, 2013
32
79
OK thanks for reply my bro I go to test 'ew with decompiled. 9 :). Thanks for reply :D.

You sure your soft don't lost quality when I resize xhdpi folder to hdpi or mdpi? Because when I use other soft for resize a lot of png I have bad quality png :( (when I have xhdpi and I want reduce to hdpi or mdpi)...

Shouldn't be any problem.. I didn't notice anything
 

brolee93

Senior Member
Jan 1, 2009
1,968
523
37
XDA city
OK pour.
Hum your soft accept max 976png?no? Because I have test with all my framework And I have error when I exceed 976png...

I have some bugs :).

1_
When I test with 400png xhdpi and I want mdpi file it isn't work I have in 400png in ldpi folder but my choice is mdpi. It is work when I test to choice mdpi and hdpi I have in finish folder 400png good in hdpi and mdpi. Good I am happy :D.
2_
Other 400png xhdpi I choose mdpi and hdpi to folder out :D I have 90 png in folder finish have you idea for this bugs?.

3_
What limit if I don't exceed for your soft work well
Without this issues I like your work it is work and speed :). I wait for version with no limit file (for example framework have 2000 png lol)
Good work my bro
Sorry for my bad English

Win xp pro 32bits core i5 2500 4go ram
Sdk android ok I think lol
 
Last edited:

icedventimocha

Senior Member
Sep 14, 2010
2,640
3,722
Erie
Love the idea behind this tool, but its not working for me. It creates the proper folders, but they are empty. Running windows vista sp2.

Edit: tried on windows 8 x86 and still same result. The only way it works is if I only convert one drawable at a time, which kinda defeats the purpose.

Sent from my Galaxy Note II
 
Last edited:

brolee93

Senior Member
Jan 1, 2009
1,968
523
37
XDA city
Tomorrow I have a hue math test, so right after it I will look into all the issues.. Thanks for reporting!:eek:

i like your soft and sorry for report bug but it for your repair and we have a great soft :) .

Edit : i have other Computer with win 7 32bits , i put 120 png xhdpi (50.9.png) i choose MDPI i have in out 1 png in LDPI folder lol ...
 
Last edited:

~RoN~

Member
Apr 3, 2013
32
79
i like your soft and sorry for report bug but it for your repair and we have a great soft :) .

Edit : i have other Computer with win 7 32bits , i put 120 png xhdpi (50.9.png) i choose MDPI i have in out 1 png in LDPI folder lol ...

I looked into it but I can't find any bugs. I will add an automatic log file that you can send me in order to see what is wrong.

Edit: I forgot that I have added new features, and while adding I fixed some things. Maybe I have already resolved this.
I am now going to upload the new version.
 
Last edited:

brolee93

Senior Member
Jan 1, 2009
1,968
523
37
XDA city
I looked into it but I can't find any bugs. I will add an automatic log file that you can send me in order to see what is wrong.

Edit: I forgot that I have added new features, and while adding I fixed some things. Maybe I have already resolved this.
I am now going to upload the new version.
OK no prob
 

brolee93

Senior Member
Jan 1, 2009
1,968
523
37
XDA city
hi boy . i have test your new version with my framework i have 1990png and i use your soft (win 7 64bits ultimate) with XHDPI to MDPi i have 1039png in finish folder .:/
where i can found logcat ?

Edit second test i have 1539 png lol
 

Top Liked Posts

  • There are no posts matching your filters.
  • 63
    [TOOL] Android Drawable Resizer Tool

    Hi!

    Can you count how many times you created a drawable for your app?
    The answer is probably NO.
    You opened your favorite image-editing software, designed a beautiful drawable, saved, and now of course, there's the simple but annoying thing, of resizing the drawable to fit every density.
    No more! Android Drawable Resizer, replaces you in the last annoying part.
    All you have to do, is to choose a drawable, tell the software which density does it belong to, choose the the res folder, and press Go!. The software will know how and where to place each resized drawable, with the correct name.


    Requirements:
    If you don't have a .NET Framework installed, download and install this:
    http://msdn.microsoft.com/en-us/vstudio/aa496123

    Instructions:

    1. Download the zip file.
    2. Extract it including the .dll file.
    3. Run the .exe file.
    *Note: Both files need to be in the same place in order to activate the program!
    4. Choose the source drawable density
    5. Choose the drawable you want to resize
    6. Choose which densities you want to export to
    7. Choose the destination folder. The program will create a folder for each density selected (if the folder doesn't exist), and then insert the resized drawables to their right place
    8. Press Go!
    9. Enjoy!
    10. Hit the Thanks button, or even donate for my work :eek:

    Current Version: 1.1.3.0
    From XDA: View attachment 1904989
    Or from dev-host - Here

    Screenshot:

    50934020.png


    To do:

    --->Change the selected drawables gallery (If you know of a free control for that, please P.M me) In progress
    --->Adding the abillity to decompile-->resize-->recompile .9.png files In progress

    --->Translation to more languages Not in the next version

    Credits:
    --->ComponentFactory Krypton 4.4.0 great .NET library
    3
    Keep up the great work!
    Already a very useful tool, and is headed towards becoming really great! :good:
    Don't stop and thanks again for the prompt response.
    You can look at my progress in the first page in the To-Do section.
    I am currently testing the new features, and already working on new ones :D

    Update: I finished the version. Many features added!
    2
    Is this compatible with xxhdpi
    Sent from my 5th Dimension eVo 3D
    *Team 420 band of Misfits*
    Not yet, I will soon add it. It is quite simple
    So this software can resize .9.PNGs without any errors?? With the placers at the correct positions??
    Yes. There shouldn't be any problems. The software refer to .9.PNGs as regular PNGs, and it just scales the images. The placers' positions shouldn't change.
    2
    Let me know if you need more: CRASH DUMP (temp file)
    Crashes when trying to run.
    Code:
    <Parameter8>System.IO.FileNotFoundException</Parameter8>

    Thank you for your efforts on this handy tool. :)

    Solved it, I was stupid enough to not include a dll file. :silly:

    I uploaded a new version. The zip now contains two files.
    Both files need to be in the same place in order to activate the program!
    2
    Thanks! Works now!
    Much appreciated for the prompt response and fix.
    Now if I may make a couple requests/suggestions.
    It would be great to be able to choose multiple files(select all) when browsing for images to resize(for batch processing)
    As it takes a while to do each one individually, but not as long as resizing manually, so that's a plus!
    Maybe that is something I am overlooking on my end to enable that in that selection window.
    Other thing I noticed was with the destination density:
    I assumed that selecting a destination density would then give me that resolution as output.
    I quickly found out, that was the opposite of how it works.
    The density I chose was the only one not produced/resized, so essentially they are all enabled by default and the selection is to omit or remove a density from the process.
    That's fine I suppose, just a little reverse of what I initially thought.
    Maybe it would be better to only output the densities selected, I don't know, small detail I guess.
    The last thing was that I noticed it tags each image name with it's density in the image name.
    That requires a lot of renaming if doing many images.
    Seems maybe if they output to relevant resolution folders, they would not have to be renamed at all.
    Again, maybe this was my fault, due to using an output folder and not leaving it to do it's default thing, but I don't think that's the case.

    Thanks again for your efforts on this.
    I could see this becoming very useful, keep up the great work! :good:

    First, I'm glad it now works.
    Second, Thank you for the suggestions. About the multi-select, it have been in my to-do list since the beginning.
    About the images renaming, you are absolutely right, especially after multi-select will be supported...
    I am starting to work on that right now. Probably tomorrow there will be new version:fingers-crossed:
    Update: I am almost done, and it looks really good :victory:
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone