load-the-image Apply to compose-jb(desktop), Used to load network and local pictures.

Overview

load-the-image

load-the-image Apply to compose-jb(desktop), Used to load network and local pictures.

🚀 Under construction

It may change incompatibly and require manual migration in the future. We would appreciate your feedback on it in Issues.

Mode of use

Root dir, settings.gradle add:
allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

build.gradle add:

repositories {
    	...
    	maven { url 'https://jitpack.io' }
}

If you just use compose-desktop

version =

Your compose-desktop dir, build.gradle add:

dependencies {
	implementation 'com.github.ltttttttttttt:load-the-image:$version'
}

Use the code load image with network and file and resources

Image(rememberImagePainter(/*url*/"https://img.zcool.cn/community/017e625e57415ea801216518c25819.jpg@1280w_1l_2o_100sh.jpg","")

If you use compose(Kotlin Multiplatform), You can refer to the example.

version =

Your common dir, build.gradle add:

val desktopMain by getting{
	dependencies {
		implementation 'com.github.ltttttttttttt:load-the-image:$version'
	}
}

commonMain add function:

@Composable
expect fun rememberImagePainter(url: String): Painter

androidMain add function(and other target):

@Composable
actual fun rememberImagePainter(url: String): Painter =
    coil.compose.rememberImagePainter(data = url)

desktopMain add function:

@Composable
actual fun rememberImagePainter(url: String): Painter =
    com.lt.load_the_image.rememberImagePainter(url)
    

Use the code load image with network and file and resources

Image(rememberImagePainter(/*url*/"https://img.zcool.cn/community/017e625e57415ea801216518c25819.jpg@1280w_1l_2o_100sh.jpg","")
You might also like...
An Android transformation library providing a variety of image transformations for Glide.
An Android transformation library providing a variety of image transformations for Glide.

Glide Transformations An Android transformation library providing a variety of image transformations for Glide. Please feel free to use this. Are you

An android image compression library.
An android image compression library.

Compressor Compressor is a lightweight and powerful android image compression library. Compressor will allow you to compress large photos into smaller

An Android transformation library providing a variety of image transformations for Picasso
An Android transformation library providing a variety of image transformations for Picasso

Picasso Transformations An Android transformation library providing a variety of image transformations for Picasso. Please feel free to use this. Are

Library to handle asynchronous image loading on Android.

WebImageLoader WebImageLoader is a library designed to take to hassle out of handling images on the web. It has the following features: Images are dow

Luban(鲁班)—Image compression with efficiency very close to WeChat Moments/可能是最接近微信朋友圈的图片压缩算法

Luban 📖 English Documentation Luban(鲁班) —— Android图片压缩工具,仿微信朋友圈压缩策略。 Luban-turbo —— 鲁班项目的turbo版本,查看trubo分支。 写在前面 家境贫寒,工作繁忙。只能不定期更新,还望网友们见谅! 项目描述 目前做A

Image Picker for Android 🤖
Image Picker for Android 🤖

Image Picker for Android 🤖

Easy to use, lightweight custom image view with rounded corners.
Easy to use, lightweight custom image view with rounded corners.

RoundedImageView Easy to use, lightweight custom image view with rounded corners. Explore the docs » View Demo · Report Bug · Request Feature About Th

Powerful and flexible library for loading, caching and displaying images on Android.
Powerful and flexible library for loading, caching and displaying images on Android.

Universal Image Loader The great ancestor of modern image-loading libraries :) UIL aims to provide a powerful, flexible and highly customizable instru

An Android library for managing images and the memory they use.
An Android library for managing images and the memory they use.

Fresco Fresco is a powerful system for displaying images in Android applications. Fresco takes care of image loading and display, so you don't have to

Comments
  • Exception in thread

    Exception in thread "main" java.lang.NoClassDefFoundError

    Exception in thread "main" java.lang.NoClassDefFoundError: kotlinx/coroutines/swing/SwingDispatcherKt 引入 org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.6.2 解决上面报错 引入org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.6.2后以下报错 java.lang.NoSuchMethodError: 'void org.jetbrains.skia.paragraph.ParagraphStyle.setTextIndent(org.jetbrains.skia.paragraph.TextIndent)

    使用版本 kotlin("jvm") version "1.6.10" id("org.jetbrains.compose") version "1.1.0"

    环境 jdk17 desktop

    opened by Xiaolangs 8
Releases(1.0.5)
Owner
lt_taozi
骚操作yyds (部分项目搞到gitee了,网络太差了,受不了...)
lt_taozi
a solution that can help developers display pictures in any shape.

android-anyshape With the solution, pictures can be displayed in any shape on Android platform. Effect The left is the UI using normal ImageViews, and

Lankton 190 Dec 22, 2022
Load images using Glide

Glide_Demo Load images using Glide Image used private val image = "https://cdn.pixabay.com/photo/2018/05/03/21/49/android-3372580_1280.png" Add Glide

Daniel Kago K 0 Nov 1, 2021
ZoomableComposeImage - A zoomable image for jetpack compose

ZoomableComposeImage - A zoomable image for jetpack compose

RERERE 10 Dec 11, 2022
ComposeImageBlurhash is a Jetpack Compose component with the necessary implementation to display a blurred image

compose-image-blurhash ComposeImageBlurhash is a Jetpack Compose component with the necessary implementation to display a blurred image while the real

Orlando Novas Rodriguez 24 Nov 18, 2022
Compose Image library for Kotlin Multiplatform.

Compose ImageLoader Compose Image library for Kotlin Multiplatform. Setup Add the dependency in your common module's commonMain sourceSet kotlin {

Seiko 45 Dec 29, 2022
An Android view for displaying repeated continuous side scrolling images. This can be used to create a parallax animation effect.

Scrolling Image View An Android view for displaying repeated continuous side scrolling images. This can be used to create a parallax animation effect.

Q42 1.8k Dec 27, 2022
An image loading and caching library for Android focused on smooth scrolling

Glide | View Glide's documentation | 简体中文文档 | Report an issue with Glide Glide is a fast and efficient open source media management and image loading

Bump Technologies 33.2k Jan 7, 2023
Android Asynchronous Networking and Image Loading

Android Asynchronous Networking and Image Loading Download Maven Git Features Kotlin coroutine/suspend support Asynchronously download: Images into Im

Koushik Dutta 6.3k Dec 27, 2022
A powerful image downloading and caching library for Android

Picasso A powerful image downloading and caching library for Android For more information please see the website Download Download the latest AAR from

Square 18.4k Jan 6, 2023
Image loading for Android backed by Kotlin Coroutines.

An image loading library for Android backed by Kotlin Coroutines. Coil is: Fast: Coil performs a number of optimizations including memory and disk cac

Coil 8.8k Jan 8, 2023