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

Update AVAssetImageDataProvider.swift #1951

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

sgarg4008
Copy link
Contributor

No description provided.

@sgarg4008
Copy link
Contributor Author

I used the kingfisher for generating the image asset but after generating the image asset, I got the rotated image and then I just added the below line in your file and it worked perfectly fine.

"generator.appliesPreferredTrackTransform = true"

This is the code I used to get the image from the video URL:-

let provider = AVAssetImageDataProvider(assetURL: URL(string: videoUrl)!, seconds: 1)
self.imageView.kf.setImage(with: provider)

Please review the changes and approve the same.

@onevcat
Copy link
Owner

onevcat commented Jun 9, 2022

I guess it is not a bad default!

@sgarg4008
Copy link
Contributor Author

I guess it is not a bad default!

Hey @onevcat,
Thanks for taking my request under consideration.

I tried the code using the default functionality but it gives me the rotated image as a result, once we set this property True, only then we get the correct result.

- generator.appliesPreferredTrackTransform = true

You can implement it at your end, just to review the same.

I'm attaching a reference link where many of the users got the same error, without setting this property to True.

Related question reference Link:-

Related answer reference Link:-

@onevcat
Copy link
Owner

onevcat commented Jun 9, 2022

Oh, I meant setting it to true would be a good idea as “new default”! Thanks for the PR.

@onevcat onevcat merged commit 586e9dd into onevcat:master Jun 9, 2022
@sgarg4008
Copy link
Contributor Author

Thanks for merging the code :)

@sgarg4008
Copy link
Contributor Author

Hey @onevcat,

I just tried updating the pod and even I tried to add your library using Swift package manager, but I couldn't find the updated changes.

Do I need to update something else?

@onevcat
Copy link
Owner

onevcat commented Jun 9, 2022

Merging it to the master branch does not mean a new release. Unless you are explicitly pointing to the master branch, the package manager will still resolve to an existing version.

I will tag these changes in a few minutes and then you can try again to upgrade to a new release.

@sgarg4008
Copy link
Contributor Author

Okay Thanks, I will wait for the new release.

@onevcat
Copy link
Owner

onevcat commented Jun 9, 2022

7.2.3 was just released for this.

@sgarg4008
Copy link
Contributor Author

Thanks for the new release.

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.

3 participants