hyperoslo / hyperoslo/Imaginary

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

Open
#101 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
610
Forks
65
PR merge metrics
No merged PRs in 30d

Description

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)
}
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.