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

Animated transformation support #659

Merged

Conversation

sagar-viradiya
Copy link
Contributor

Closes #176

  • Support transformation on gif, heif, and webp.

- Add interface for animated transformation.
- Register post processor in ImageDecoderDecoder.kt to invoke transformation after decoding.
- Invoke transformation after drawing to software canvas in case of MovieDrawable.kt
- Add extension method on ImageRequest.Builder to allow adding AnimatedTransformation.kt
- Remove extra line at the end of Gifs.kt
- Add test to check rounded corner transformation is producing correct result on an image.
- Modify instrumentation test to verify gif, heif and webp transformations.
- Fix bug related to transformation in GifDecoder.kt where transformation rendering position was off by applying transformation after drawing on software canvas rather than while drawing on canvas.
- Minor code formatting.
@colinrtwhite
Copy link
Member

Awesome, thanks for implementing this! To fix the API check error run ./gradlew apiDump and commit the files.

- Code refactoring and PR review suggestions
- Fix instrumentation test failing for HEIF and Webp transformation below API level 28
- API dump
- Fix class not found error for rounded rectangle below API level 21 in RoundedCornerTransformation.kt
Copy link
Member

@colinrtwhite colinrtwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple last comments - thanks again for the great job on this! 🙌

@colinrtwhite
Copy link
Member

Please convert this to a non-draft PR when you're ready for it to be merged.

- Remove size from transform call as it was unnecessary.
@sagar-viradiya sagar-viradiya marked this pull request as ready for review February 9, 2021 18:12
@colinrtwhite colinrtwhite merged commit 590646c into coil-kt:master Feb 12, 2021
colinrtwhite pushed a commit that referenced this pull request Oct 5, 2022
* Support for gif transformation

- Add interface for animated transformation.
- Register post processor in ImageDecoderDecoder.kt to invoke transformation after decoding.
- Invoke transformation after drawing to software canvas in case of MovieDrawable.kt
- Add extension method on ImageRequest.Builder to allow adding AnimatedTransformation.kt

* Code formatting

- Remove extra line at the end of Gifs.kt

* Instrumentation test

- Add test to check rounded corner transformation is producing correct result on an image.

* Instrumentation test

- Modify instrumentation test to verify gif, heif and webp transformations.

* Bug fix

- Fix bug related to transformation in GifDecoder.kt where transformation rendering position was off by applying transformation after drawing on software canvas rather than while drawing on canvas.

* Code refactoring

- Minor code formatting.

* PR review and instrumentation test fixes

- Code refactoring and PR review suggestions
- Fix instrumentation test failing for HEIF and Webp transformation below API level 28
- API dump

* Fix the instrumentation test failure

- Fix class not found error for rounded rectangle below API level 21 in RoundedCornerTransformation.kt

* Transformation API change

- Remove size from transform call as it was unnecessary.
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

Successfully merging this pull request may close these issues.

Add support for transformations in coil-gif
2 participants