Skip to content

Fetcher to load multiple images and combine / overlay them #2896

Closed Answered by MFlisar
MFlisar asked this question in Q&A
Discussion options

You must be logged in to vote

Could solve it. With following function I can get drawables from the fetcher and then I can combine the drawables.

fun getDrawable(options: Options, result: FetchResult?): Drawable? {
        return when (result) {
            is DrawableResult -> result.drawable
            is SourceResult -> {
                val bitmap = BitmapFactory.decodeStream(result.source.source().inputStream())
                val b = when (options.scale) {
                    Scale.FILL -> bitmap
                    Scale.FIT -> scaleCenterCrop(
                        bitmap,
                        options.size.width.pxOrElse { 0 },
                        options.size.height.pxOrElse { 0 })
                }…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MFlisar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant