[TOOL][.9.png][REPOST] 9-Patch-Resizer

Search This thread

Peteragent5

Senior Member
Jan 1, 2012
1,280
2,025
Richmond
Changelog:

Code:
[B]v2.7[/B]
- Numerous bug fixes
- Fixed compiler warnings
- Included portable ImageMagick binaries
- Updated ImageMagick to 6.8.5-8
- Improved commandline options
- A selection of DPIs must now be chosen
- Fixed Java errors
- Fixed settings.ini errors
- Renamed log to: art-log.txt
- Displays an error/warning when conversion fails
- Log can now output both stdout & stderr
- Improved searching for photos in source folder
- No longer need Boost

[B]v2.6[/B]
- Fixed the output of images
- Added Drag & Drop feature
- Runs a load of tests before converting
- Updated convert.exe to 6.8.4-8 (for Windows)
- Added some code that give some hints if conversion of a png || 9.png file fails.
- The program now will continue converting if a failure occurs. Previously it skipped files.
- Pictures with small dimensions will not convert
- Fixed command line arguments
- Fixed the date on logging output
- Optimized the tool for better memory
- Bug fixes

[B]v2.5[/B]
- Rewritten code using C++, now native on OS
- Many bug fixes
- Removed drag & drop feature
- Logging feature added
- Improved speed of booting
- New UI
- Portable convert.exe for Windows
- You still need to install ImageMagick on Linux/MacOSX

[B]v2.4[/B]
- Drag & Drop source folder onto art.exe to convert
- First time Setup
- Cleaned up the UI
- Removed clean-folders.exe
- No need to install ImageMagick
- Improved boot time
- Checks for errors before converting
- Available syntax & usage

[B]v2.3[/B]
- Very smart clean folders EXE file (Windows Only)
- Switched to EXE files (Windows Only)
- Fixed settings.ini resetting to defaults while restarting RUN-ME.exe (Windows Only)
- Fixed settings.ini detection (Windows Only)
- Improved a lot (Windows Only)

[B]v2.2[/B]
- Adapted Windows Vista/7 Environment (Windows Only)
- Fixed ImageMagick check on 64-bit machines (Windows Only)
- Fixed some errors in the batch files (Windows Only)
- Check for Java (Windows Only)

[B]v2.1.1[/B]
- Support for Mac OS X
- Fixed input sub-folder detection (Windows Only)
- Modified settings to match each OS
- Switched all archived formats to: TAR

[B]v2.1[/B]
- Cleaned up workspace
- Support for Linux/Unix
- Added README file for Instructions & Usage
- Improved clean-folders dramatically. It now depends on settings.ini. (Windows Only)
- Addded 64-bit support (Windows Only)
- Automatically detects if PC 32-bit or 64-bit (Windows Only)

[B]v2.0.0[/B]
- Initial shared release
 
Last edited:

Pator57

Senior Member
Jun 11, 2012
1,040
308
I thought I finally released this project I've been working on...
(Help me come up with a different name for this tool..)

This is a fork from: Android Drawable Converter
Licensed under: GNU GPL v3


Supported DPIs:
  • XHDPI
  • HDPI
  • MDPI
  • LDPI

Features:
  • Supports all/most DPIs
  • Supports .9.png (draw9patch) (nine) converting/resizing
  • Convert drawables into multiple densities automatically
  • Added a BAT script to fasten up this process
  • Saves you time! :D

How to do it:
  • Download & Install ImageMagick (Q16)
  • Download the file below. Unzip it to a place with no spaces. e.g. C:\
  • Place the PNGs you want to convert in "in" folder.
  • The default output folder is "out"
    • Be sure to set the right DPI for source and destination (in & out folder)
  • Run: RUN-ME.bat
    • Y to Start converting
    • N to modify settings
    • X to Exit

Versions:
  • JAR version: 2.0.0
  • BAT version: 0.1

ALL credits to:
(He made this possible! ^^)

Please do not ask me to make this compatible with Linux, UNIX, BSD, or Mac. I will not!
[highlight]Windows ONLY[/highlight]

(If you found a way to install ImageMagick on one of the OS above, and modified the "convert_command" code for your OS, please let me know.)


DOWNLOAD
(Remember: All credits to kevinkamps)

Thanks luffy :).I will try.

Sent from my HTC Wildfire using xda premium
 
  • Like
Reactions: Mam.Q

bigsupersquid

Senior Member
Sep 22, 2010
2,254
1,671
BFE, MO
Google Pixel 4a 5G
in Debian linux,
apt-get install imagemagick

imagemagick for linux is called by typing command without the .exe, and the path to it is set automatically when it is installed by apt-get.

can't execute the RUN-ME.bat in a minimal Wine (windows emulator) install 'cause it can't get at imagemagick or Java. bummer.
 

Peteragent5

Senior Member
Jan 1, 2012
1,280
2,025
Richmond
in Debian linux,
apt-get install imagemagick

imagemagick for linux is called by typing command without the .exe, and the path to it is set automatically when it is installed by apt-get.

can't execute the RUN-ME.bat in a minimal Wine (windows emulator) install 'cause it can't get at imagemagick or Java. bummer.
Hmmm I think you could manually set the Linux command for the imagemajick settings, it should be similar to the one in the settings.INI

Set your imagmacjick path to where the Linux has the convert.exe

Then just execute the JAR file :)
 
Last edited:

shinobisoft

Recognized Contributor
Feb 18, 2012
3,308
3,434
Knoxville, TN
But I would also have to manually extract all pngs from each folder then I would have to put all the pngs back into the correct folders after I'm done

Right? Is there a less time consuming method?

Sent from the My Little Pony Official App

To the OP::
I'd be willing to write a GUI front-end for windows to automate extracting/replacing images within the apk's or zip files along with executing the script. I have another project in the works, but I can put this together if we get enough input.
 

ermacwins

Senior Member
Aug 25, 2009
5,920
1,025
I get a Java is not recognized as an internal or external command operable program or batch file
 

Peteragent5

Senior Member
Jan 1, 2012
1,280
2,025
Richmond
But I would also have to manually extract all pngs from each folder then I would have to put all the pngs back into the correct folders after I'm done

Right? Is there a less time consuming method?

Sent from the My Little Pony Official App

To the OP::
I'd be willing to write a GUI front-end for windows to automate extracting/replacing images within the apk's or zip files along with executing the script. I have another project in the works, but I can put this together if we get enough input.
Hmmm, you could write a GUI, only if it's not time consuming. I actually have a batch file that does unzipping and zipping. I could merge that with this batch file.

Which one do you guys want? GUI or Command Line (Batch)? My batch file is pretty user-friendly, but it's likely to be the GUI that will be more user-friendly.
I get a Java is not recognized as an internal or external command operable program or batch file

Can you send me a screenshot?
 

mDroidd

Senior Member
Aug 27, 2011
1,844
1,362
mappz-development.com
Hey there!

Maybe you know my tool StudioAndroid bit.ly/SA-XDA

It has a resize option to, done with ImageMagick or PIL.

Maybe you can tell me why convert does not work on linux? It does for me... maybe I can help you!

And can you tell me how to resize the 9png's? Atm I just copy them over to the right dir without resizing anything..

Btw, yes, my tool also resizes (and much more) and is for Mac, Linux and Windows.

Maybe we could share experiences!

Sent from my Galaxy Nexus using Tapatalk 2
 

Peteragent5

Senior Member
Jan 1, 2012
1,280
2,025
Richmond
Hey there!

Maybe you know my tool StudioAndroid bit.ly/SA-XDA

It has a resize option to, done with ImageMagick or PIL.

Maybe you can tell me why convert does not work on linux? It does for me... maybe I can help you!

And can you tell me how to resize the 9png's? Atm I just copy them over to the right dir without resizing anything..

Btw, yes, my tool also resizes (and much more) and is for Mac, Linux and Windows.

Maybe we could share experiences!

Sent from my Galaxy Nexus using Tapatalk 2

Yes I know you :)

I resize the .9.pngs all because of the JAR file. But that JAR file is dependent on the settings.ini

To make it work on linux, mac, etc, you'll need to have the right values.

The convert_command is the path where convert.exe is located PLUS the commands: "-resize %3$s -unsharp 0x1 %1$s %2$s"

I think the convert.exe should be where ImageMagick is installed, maybe because of the dependencies inside the installation location.

And everything else in the settings.ini is pretty straightforward... :)
 

ermacwins

Senior Member
Aug 25, 2009
5,920
1,025
Can you send me a screenshot?

n1ax51.jpg
 

Top Liked Posts

  • There are no posts matching your filters.
  • 154
    Description:
    • A resizer tool to automaticaly resize png files and 9 patches in several densities
    Source Code


    Supported DPIs:
    • XXXHDPI
    • XXHDPI
    • XHDPI
    • HDPI
    • MDPI
    • LDPI


    Thanks to:


    35
    Changelog:

    Code:
    [B]v2.7[/B]
    - Numerous bug fixes
    - Fixed compiler warnings
    - Included portable ImageMagick binaries
    - Updated ImageMagick to 6.8.5-8
    - Improved commandline options
    - A selection of DPIs must now be chosen
    - Fixed Java errors
    - Fixed settings.ini errors
    - Renamed log to: art-log.txt
    - Displays an error/warning when conversion fails
    - Log can now output both stdout & stderr
    - Improved searching for photos in source folder
    - No longer need Boost
    
    [B]v2.6[/B]
    - Fixed the output of images
    - Added Drag & Drop feature
    - Runs a load of tests before converting
    - Updated convert.exe to 6.8.4-8 (for Windows)
    - Added some code that give some hints if conversion of a png || 9.png file fails.
    - The program now will continue converting if a failure occurs. Previously it skipped files.
    - Pictures with small dimensions will not convert
    - Fixed command line arguments
    - Fixed the date on logging output
    - Optimized the tool for better memory
    - Bug fixes
    
    [B]v2.5[/B]
    - Rewritten code using C++, now native on OS
    - Many bug fixes
    - Removed drag & drop feature
    - Logging feature added
    - Improved speed of booting
    - New UI
    - Portable convert.exe for Windows
    - You still need to install ImageMagick on Linux/MacOSX
    
    [B]v2.4[/B]
    - Drag & Drop source folder onto art.exe to convert
    - First time Setup
    - Cleaned up the UI
    - Removed clean-folders.exe
    - No need to install ImageMagick
    - Improved boot time
    - Checks for errors before converting
    - Available syntax & usage
    
    [B]v2.3[/B]
    - Very smart clean folders EXE file (Windows Only)
    - Switched to EXE files (Windows Only)
    - Fixed settings.ini resetting to defaults while restarting RUN-ME.exe (Windows Only)
    - Fixed settings.ini detection (Windows Only)
    - Improved a lot (Windows Only)
    
    [B]v2.2[/B]
    - Adapted Windows Vista/7 Environment (Windows Only)
    - Fixed ImageMagick check on 64-bit machines (Windows Only)
    - Fixed some errors in the batch files (Windows Only)
    - Check for Java (Windows Only)
    
    [B]v2.1.1[/B]
    - Support for Mac OS X
    - Fixed input sub-folder detection (Windows Only)
    - Modified settings to match each OS
    - Switched all archived formats to: TAR
    
    [B]v2.1[/B]
    - Cleaned up workspace
    - Support for Linux/Unix
    - Added README file for Instructions & Usage
    - Improved clean-folders dramatically. It now depends on settings.ini. (Windows Only)
    - Addded 64-bit support (Windows Only)
    - Automatically detects if PC 32-bit or 64-bit (Windows Only)
    
    [B]v2.0.0[/B]
    - Initial shared release
    4
    Here's a new beta release: beta 4

    Fixed:
    • Dpi selection menu errors
    • settings.ini errors
    Focus:
    • Java not found errors
    • settings.ini errors
    4
    Here's a new beta release: beta 2

    Focus:
    • Converting errors
    • settings.ini not found errors
    • Java errors, now reads windows registry for Java installation
    3
    Here's a new beta release: beta 3

    Focus:
    • Java errors
    • Dpi selection menu errors