Added resizing with keeping aspect ratio when dimension is 0.#663
Conversation
|
Thanks! We'll try to look soon. Both of us presenting at a conference this On Fri, Sep 19, 2014 at 9:50 AM, Michał Charmas notifications@github.com
|
|
This looks great. I would like to see a test that exercises the actual resize logic though. I think there's four cases: resizing up and resizing down for both width-fixed and height-fixed aspect ratios. Do you think you can add those? |
|
Needs a rebase. |
|
Glad it works for you. My implementation of crop that aligns to top transformation looks like this: Api call that uses this transformation looks like this: So to sum up:
|
|
Still missing tests that show the actual behavior (mentioned above). |
|
@mcharmas can you please add more tests? We are wrapping up 2.4 and I can't accept this change without more tests. |
|
Yep, I'll add these tests in few hours. |
|
Tests added. |
|
Thank you! looking now. |
Added resizing with keeping aspect ratio when dimension is 0.
I have added possibility to resize with keeping aspect ratio as discussed in #613 to be able to write alignTopCrop transformation efficiently. There are some issues like #226 that are solved with this pull request.
To resize keeping aspect ratio one should pass 0 as unknown resize dimension to
resizemethod of builder.