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

Image rotating in side Collectionview cell after converted to tintcolor of the image #101

Open
NallapatiMalleswari opened this issue Jun 10, 2021 · 1 comment

Comments

@NallapatiMalleswari
Copy link

I have collection view with horizontal scrolling of images, those images are placing correct with original colour, after changing the images tint colour using this , the images are rotated.

let headers: [String: String] = BaseService().allheaders(headers: nil)

        var colorOption = Option(imagePreprocessor: TintImageProcessor(tintColor: .black))
        colorOption.downloaderMaker = {
            return ImageDownloader(modifyRequest: {
                var request = $0
                for (headerField, headerValue) in headers {
                    request.addValue(headerValue, forHTTPHeaderField: headerField)
                }
                return request
            })
        }
        self.setImage(url: imageUrl, option: colorOption) { (result) in
            switch result {
            case .value(let image):
                completion(image)
            case .error(let error):
                completion(nil)
            }
        }
@NallapatiMalleswari
Copy link
Author

NallapatiMalleswari commented Jun 10, 2021

I have structed here from last 24 hours, any help would be appreciated.

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

1 participant