티스토리 뷰
안드로이드/코틀린
[Android Studio]Glide와 Picasso 라이브러리 이미지 주소로 불러오기 library image load to uri
eqrw105 2021. 4. 23. 06:31[Android Studio]Glide와 Picasso 라이브러리 이미지 주소로 불러오기 library image load to uri
1. Glide (최신버전 해당 라이브러리 사이트 참고)
https://github.com/bumptech/glide
bumptech/glide
An image loading and caching library for Android focused on smooth scrolling - bumptech/glide
github.com
1-1 build.gradle 작성
dependencies {
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
}
1-2 이미지 호출
Glide
.with(context)
.load(uri)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.transition(DrawableTransitionOptions.withCrossFade())
.into(imageview)
,
2. Picasso (최신버전 해당 라이브러리 사이트 참고)
https://github.com/square/picasso
square/picasso
A powerful image downloading and caching library for Android - square/picasso
github.com
2-1 build.gradle 작성
dependencies {
implementation 'com.squareup.picasso:picasso:2.71828'
}
2-2 이미지 호출
Picasso.get().load(uri).into(holder.mLayout_Main_Picture_Imageview)
3. Glide와 Picasso의 차이
항목 | Glide | Picasso |
속성 및 옵션 | Picasso에 비해 많음 | Glide에 비해 적음 |
메모리 사용량 | 이미지를 리사이징 하여 적은 메모리 사용 | 원본 이미지 사용으로 많은 메모리 사용 |
캐싱 | 이미지를 리사이징하여 저장 | 원본 이미지를 저장 |
속도 | 네트워크상에서 리사이즈하여 로딩하므로 느리지만 캐시 이미지 로딩 속도는 빠름 | 원본 이미지 로딩은 빠르나 캐시 이미지 로딩 속도는 느림 |
품질 | 낮은 비트 사용으로 품질 낮음 | 높은 비트 사용으로 품질 높음 |
GIF | 지원 | 미지원 |
'안드로이드 > 코틀린' 카테고리의 다른 글
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- next.js useEffect
- 안드로이드 스튜디오 해시키
- 깃랩에서 깃허브로
- room error
- 깃허브에서 깃랩으로
- 안드로이드 해시키
- react.js useEffect
- Build failed because of webpack errors
- rn oss
- 커밋 이메일 변경
- gitlab mirror
- amplify build error
- react native oss
- amplify next.js
- nextjs ssr deploy
- kakao api notworking
- 코틀린
- next useEffect
- 안드로이드 스튜디오
- react native 오픈소스 라이선스
- 라이브러리 라이센스
- 깃랩 잔디 옮기기
- rn 오픈소스 라이센스
- kotlin
- next.js ssr deploy
- non-zero exit code detected
- Android Studio
- 카카오 해시키
- github mirror
- 깃허브 잔디 옮기기
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
글 보관함