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

Allow arbitrary rotation angle #14

Open
jcpsantiago opened this issue Oct 13, 2019 · 1 comment
Open

Allow arbitrary rotation angle #14

jcpsantiago opened this issue Oct 13, 2019 · 1 comment

Comments

@jcpsantiago
Copy link

I'm looking for a way to rotate an image with a transparent background and found your library. I understand the merits of only allowing thetas multiple of 90deg, but that's a concern that I don't have at all (there's no background anyway, so it's fine to lose information there).

I looked at the source code but don't really know where to start, geometry is not my strong suit. Is this something complicated to implement? If it's something you don't/can't do, could you give me some pointers?

@karls
Copy link
Owner

karls commented Oct 17, 2019

Hey @jcpsantiago. Thank you for your interest in collage.

First off, I am too busy to take this on myself at the moment. But if you want to give it a shot, I'd be happy to help review code etc.

Geometry isn't my strong suit either. :) I had a quick look at the rotation code and I think the hard part (probably) is figuring out what the width and height of the new image should be. I found this one pager with some pointers on how to do it.

I don't think making this work would be overly difficult, but it's still a bit of work fiddling with the Java APIs, figuring out corner cases (like handling background colour for non-transparent images rotated through arbitrary angles etc), tests and so on.

If you felt like taking a stab at this, I would be happy. I have very little spare bandwidth to work on this myself at the moment.

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

2 participants