Giter Site home page Giter Site logo

9-patch-resizer's Introduction

Tools 9-Patch-Resizer

A resizer tool to automaticaly resize png files and 9 patches in several densities (previously hosted on https://code.google.com/p/9patch-resizer/)

Build Status

Download

To get the latest build (.jar or .exe file), check the release page on the github project: https://github.com/redwarp/9-Patch-Resizer/releases

The .exe file is just a wrapper around the executable .jar file, use it if you don't feel comfortable with a java archive ^_^

What is it exactly?

Let's face it : juggling with densities for Android is a bit of a pain, especially when dealing with 9 patch png.

And then comes this tool, that takes a xhdpi PNG file, or 9.png file, and generates ldpi, mdpi and hdpi png files automatically.

As simple as drag and drop can get.

And here is the changelog

Current version : 1.4.2

You're using 9patch resizer for your apps ? Don't hesitate and leave me a message!

Links

Roadmap

I'll be honest, I don't really maintain 9-Patch-Resizer anymore, as 9-patch are somewhat a thing of the past, and I use as many vector drawables as possible lately.

I will of course consider bug fixes, but I might not have the bandwidth for feature requests.

Sorry about that.

  • A proper "Settings" panel, to handle issues such as jpeg compression, etc etc...
  • A few optimisations
  • Command line support
  • Options to set the input density (if people wan't to downsize from hdpi and not from xdpi for instance)
  • Proper JPG support

Contributors

  • redwarp
  • Jean-Baptiste LAB - Made the app working in command line

Join us, and together, we can rule the galaxy as coders and...

Notable forks

Anyway...

If for some weird reasons, some of your PNG files aren't resized properly, don't hesitate to send them to me, so that I can investigate !

9-patch-resizer's People

Contributors

jeanbaptistelab avatar redwarp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

9-patch-resizer's Issues

Jpeg quality setting

First, thank you so much for the work on jpeg support!

To make this tool even more flexible and fit all needs, having the jpeg output quality configurable would be ideal.

Maybe just a settings dialog to enter what output quality you want for your jpegs.

Another thought is that most jpegs actually store the quality setting they were exported with in their metadata, we could read that and use that for the output quality. Not sure if that's a good idea, but thought it'd mention it. (Even with this, you'd probably still want an option to override it with some configurable value)

mipmap option

Hi, I was just reading through Lollipop/Nexus 6 docs and best-practice posts and saw that for the Nexus 6 (launcher-) icon, mipmap- instead of drawable-folders are suggested:

http://android-developers.blogspot.de/2014/10/getting-your-apps-ready-for-nexus-6-and.html
http://stackoverflow.com/questions/23935810/mipmap-drawables-for-icons

I guess a simple checkbox/switch would do the trick. What do you think? I could probably fork and do this myself if I find some time, I just wanted to pin it here first.

PNG files density

When I provide the source image with DPI 640 (xxxhdpi), the resizer could be able to write the proper value to the resulting PNG files metadata (480 for xxhdpi, 320 for xhdpi, 240 for hdpi, 160 for mdpi, 120 for ldpi). It is just a minor thing, but it would be nice to have it written there correctly.
Thank you

//EDIT: I missed #11 - sorry for that and please close this :)

Want to help doing some stuff

Hi,

I made some tiem ago (from and old version of your code) a mod to be able to export also for iOS devices (@2x, @3x,..). I have now made a mod that includes the following:

  • Normalize input file names: android doesn't like dashes or numbers at the beginning or uppercase letters, so name of file is normalized so it works with android
  • Generate also iPhone6+ (@3x = xxhdpi), iPhone 5 (@2x = xhdpi), and iPhone 3 (= mdpi) resolutions in a different folder
  • Also put the iOS files all together in a .imageasset folder and generate a Contents.json file for each PNG, so the can be easily added to an Xcode image assets
  • Put upscaled images in a separate "[UPSCALED]" folder (in case xxxhdpi is generated from xxhdpi for example) so you are warned that those files have lower quality.

I would like you to comment these improvements to know if I can them adapt these features to your newest code and you are prone to accept them as merge requests.

Kind regards

command line processing

Nice tool I use a lot (when i finally figure out what density i gave the assets in ;))
Looking the Main class, it looks like the command line only takes a list of files.
It should be possible to specify the input density and the output densities wanted, as it happens by using the UI.

Otherwise a bit of documentation about how to use it using the command line (or maybe i didn't find it)
Tx

Density input

Hello,

9Patch Resizer is a very practical software.

However, I do not understand the density input option

Could someone explain to me the importance of varying input density?

Thank you

Options pane should be visible all the time

Options pane should be visible all the time. Now when I process at least one image it's gone. It'd be handy to have it either visible all the time (so I could easily change parameters during my work) or at least be able to make it visible w/o restarting the app

Command line

9 patch Resizer is great, but it would be really cool if :
it would work in command line.

JPEG support

Great tool! Will it be possible to work with JPEG images too?
Right now, if I put a .JPG image as input, the generated scaled versions are all PNG

blurry image

some output images blured.Some images Volume become bigger.

Why image density doesn't change?

Hi guys,

thanks for this very useful tool.

Question is very simple: why the generated images has the same density? Each folder (hdpi, xhdpi, xxhdpi, ecc) should be a different density, but generated images have different size but same density, in fact images are not sharp.

I hope someone can answer.
Thanks

Giulio

Files don't always get generated?

I love this tool but it does not always work. Sometimes the files get generated and sometimes they don't. It always says "Finished" in the Resizer Dialog but more often than not the files are not in the destination folders. Am I doing something wrong?

Possibility to add qualifiers to folder names

I'm using 9-patch resizer tool and it's great .
Could you please add possibility to add qualifiers to result folders names?
So I could receive folder drawable-port-xhdpi or drawable-large-xhdpi and so on.

Remove unsupported symbols from filenames

I mean replace "-" with "", remove @2x (ofter need to convert ios resources) from filename end.
In generally, remove all unsupported symbols that cause "Invalid file name: must contain only lowercase letters and digits ([a-z0-9
.])" error.

Drop doesn't work anymore

I used this tool several times in the last year and it worked perfectly! Today I faced the problem, that droping files onto the window doesn't work anymore. What could be the problem?
Is there another way to include the files?

Command line option : use-nearest-neighbor

I would like to use this program from a command-line (no-gui).
But I tried icons that don't need interpolation or anti-aliasing during resizing,
and they do suffer a bit compared to using 'nearest-neighbor'.
So I would like to request a nearest-neighbor resize filter option on the command line.

Work with Java 1.9?

Love this tool. Installed it on a new laptop and it is saying "This application requires a Java Runtime Environment 1.6.0". I have 1.9 (JRE and JDK) installed on the laptop and in the path. To complicate things a bit I am having to point to the Android Studio JRE for my JAVA_HOME. Either way I believe the JRE is greater than 1.6. Probably something stupid on my side...thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.