Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd number in options.layoutOptions.padding produces blurred sprite #48

Open
sanbor opened this issue Jun 1, 2016 · 6 comments
Open

Comments

@sanbor
Copy link

sanbor commented Jun 1, 2016

Try generating an sprite with options.layoutOptions.padding = 5 and you'll notice that the generated sprite is blurred. Probably it's due to some rounding when positioning the elements.

Please at least add a warning in the docs until it's fixed.

@selaux
Copy link
Owner

selaux commented Jun 8, 2016

This might be a compositor issue, since we only use integers to do the layout as far as I know. Can you ellaborate some more on your configuration? (I currently dont have a lot of time to test)

@sanbor
Copy link
Author

sanbor commented Jun 8, 2016

I'm trying to reproduce the bug with some random images but the results seems to be right. I wonder if I need some particular image sizes to be able to reproduce the issue. I'll keep trying and let you know.

@selaux
Copy link
Owner

selaux commented Jun 9, 2016

Does it maybe only happen for the packed layout? I see some integer divisions there.

@jaime-olivares
Copy link

In general the jimp compositor seems to produce blurry results. I have tried scaling and the quality of the icons is really poor. That's a bummer, as I liked the pure-javascript option. By the way, all those messages related to the canvas installation are really annoying.

@selaux
Copy link
Owner

selaux commented Jul 19, 2016

So an even padding also produces blurry results? If so please file an issue with https://github.com/oliver-moran/jimp.

@selaux
Copy link
Owner

selaux commented Mar 2, 2017

Can you still reproduce this on current master? Is this maybe related to scaling?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants