Comments (17)
Can you link the incriminated images and settings?
from 9-patch-resizer.
In file "densities.json":
{
"scale": 4,
"name": "xxxhdpi",
"active": true
},
{
"scale": 2,
"name": "xhdpi",
"active": true
},
Left is the default icon xxxhdpi(240x240) , right is convert to
xhdpi(120x120), you can see the blurring edage beside the characters;
bottom is the xxxhdpi(output density);
When select output density xxxhdpi , the output image's volume is bigger
than the default image.
[image: 内嵌图片 1]
[image: 内嵌图片 2]
2014-11-21 0:02 GMT+08:00 redwarp [email protected]:
Can you link the incriminated images and settings?
—
Reply to this email directly or view it on GitHub
#18 (comment)
.
from 9-patch-resizer.
Hi, somehow the images didn't get link. To link them, got on the issue's address on Github (#18), instead of using an email to reply.
Thanks in advance !
from 9-patch-resizer.
Hello. I looked up your samples, and well, here are my conclusions:
With the current resizing algorithm, there is nothing I can do to make it look better.
When you create an asset that's half the size, the resize algorythm use "blinear interpolation" (http://en.wikipedia.org/wiki/Bilinear_interpolation) but, according to Wikipedia: "Bilinear interpolation tends, however, to produce a greater number of interpolation artifacts (such as aliasing, blurring, and edge halos) than more computationally demanding techniques such as bicubic interpolation.
Let's take your xxxhdpi image for exemple: the first B on the left starts at pixel column 67. So an uneven number. With a bilinear interpolation, it tries to smooth the column (divided by two, it becomes column 33.5, which means the letter is gonna be drawn on column 33 and column 34), and it create a blur.
So what are the solutions?
- Find a better algorithm
- Apply a "sharpening filter" after resizing to reduce the blur (I've been thinking about it, but didn't find the time to work on it yet)
- Have assets with no straight lines, or lines that are divisible by 2
For the second problem, the fact that the xxxhdpi output is bigger than the input: I'm aware of it, it can happen sometimes. It's because in the output folder, I reencode the output. It shouldn't be done, and I will fix it in the next release.
from 9-patch-resizer.
I'm working on a "sharpen" feature currently. It will be optional, because wether it makes the results better or not is subjective.
from 9-patch-resizer.
all images are blurry, is anything you can do?
from 9-patch-resizer.
@noam2 Please provide some sample images.
from 9-patch-resizer.
can you give me your email and ill show you
from 9-patch-resizer.
@noam2 Same username, at gmail
from 9-patch-resizer.
[email protected] ? sent you , you didnt reply
from 9-patch-resizer.
@noam2 Sorry, went of grid for the weekend.
I looked at your image and... the original is a 94x116 mdpi image. And from that, you generate the other densities (hdpi, xhdpi, xxhdpi). Which makes your image bigger, and of course blurry.
For this tool to work for you, you need to have an original in xxhdpi. And it will create for you smaller pictures. If you create bigger pictures, like in photoshop, you get a blurred result.
Cheers
from 9-patch-resizer.
from 9-patch-resizer.
@noam2 "mdpi" should be the base of what you want as the smallest image. So if you want the mdpi image to be 100x100 pixel, you would create a high quality 300x300 xxhdpi image. (Remember that mdpi is x1, hdpi is x1.5, xhdpi is x2 and xxhdpi is x3)
I don't think that you need to care for ldpi anymore. Recent phones have usually a better screen density than that.
I would not advice to do a 100 images animation: it would probably use up too much memory.
from 9-patch-resizer.
from 9-patch-resizer.
@noam2 About densities, depends what kind of phones you target, and in what market I guess. In western countries, I think they are no useless, not sure about India or China.
For animation: yes, you would take care of every pictures
As for the densities calculation, that's basic android stuff :-) check https://developer.android.com/guide/practices/screens_support.html and read the part about "Alternative drawables"
I hope it helps!
from 9-patch-resizer.
from 9-patch-resizer.
Hey sorry, I don't think I can really provide more help than that. I would personally use mdpi, hdpi, xhdpi and xxhdpi. I'm not sure it's still appropriate though, maybe you should look for stats about screen density usage?
All the resources and where to put them are explained in the Android Developer tutorials (https://www.udacity.com/course/android-developer-nanodegree-by-google--nd801) it's free.
This is outside of the problem of this ticket, so I will comment on that no further.
Good luck with your app.
from 9-patch-resizer.
Related Issues (20)
- mipmap option HOT 13
- use xxxhdpi as source
- Jpeg quality setting HOT 2
- Please add instructions to compile the jar HOT 2
- Image Resize is Changing Color HOT 6
- Location of converted files HOT 1
- Files don't always get generated? HOT 19
- Drop doesn't work anymore HOT 8
- command line processing HOT 4
- Add 'mipmap' option for output!!! HOT 9
- Here's a macOS app wrapper HOT 5
- How do I choose the source input density? HOT 4
- I can't download HOT 1
- Work with Java 1.9? HOT 2
- Density input HOT 3
- Help for building a project HOT 5
- Support WebP
- Command line option : use-nearest-neighbor HOT 2
- 1g1h2j HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 9-patch-resizer.