Skip to content

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

@NallapatiMalleswari

Description

@NallapatiMalleswari

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions