Comments (3)
@slavzilla , I have used: fun ImageView.loadCircularImage(uri: String?, width: Float){ val options = RequestOptions() .placeholder(android.R.color.transparent) Glide.with(context).setDefaultRequestOptions(options).load(uri) .apply { if (width > 0){ apply(RequestOptions.bitmapTransform(CropCircleWithBorderTransformation(context.dp2px(width), Color.WHITE))) } else { apply(RequestOptions.circleCropTransform()) } } .into(this) }
But not getting expected result either
Yeah man, I eventually gave up. Nobody replied for like two years...
from glide-transformations.
You can have a workaround for this particular case like this:
fun ImageView.loadCircularImage(uri: String?, width: Float){ val options = RequestOptions() .placeholder(android.R.color.transparent) Glide.with(context).setDefaultRequestOptions(options).load(uri) .apply { if (width > 0){ apply(RequestOptions.bitmapTransform(CropCircleWithBorderTransformation(context.dp2px(width), Color.WHITE))) } else { apply(RequestOptions.circleCropTransform()) } } .into(this) }
But this is not really a solution, right? 0 is still not 1.
from glide-transformations.
@slavzilla , I have used:
fun ImageView.loadCircularImage(uri: String?, width: Float){ val options = RequestOptions() .placeholder(android.R.color.transparent) Glide.with(context).setDefaultRequestOptions(options).load(uri) .apply { if (width > 0){ apply(RequestOptions.bitmapTransform(CropCircleWithBorderTransformation(context.dp2px(width), Color.WHITE))) } else { apply(RequestOptions.circleCropTransform()) } } .into(this) }
But not getting expected result either
from glide-transformations.
Related Issues (20)
- Question
- Is it possible to use blur and vignette effect on an Imageview ?
- lib not work HOT 1
- ImageView resize(override()) and rounded corner(RoundedCorner()) at same time not work
- čžšćĄ
- border
- How to apply different corner values for each corner with RoundedCornersTransformation HOT 2
- Support Glide 4.11.0 HOT 1
- BlurTransformation Old Usage
- CropCircleWithBorderTransformation - border radius incorrect HOT 1
- How to RoundedCornersTransformation with border HOT 1
- Moving from JCenter to MavenCentral or JitPack HOT 8
- Calling RS with no Context active. HOT 1
- RoundedCornersTransformation doesn't work with video HOT 1
- signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) crash spike after updating to 4.3.0 HOT 6
- Glide version 4.11 causing crash on Huawei devices. HOT 1
- How to achieve the effect shown in the figure by use CircleCrop?
- Failed to resolve: jp.wasabeef:glide-transformations:4.1.0 in Android studio
- GrayscaleTransformation Will make the Bitmap smaller ,Unable to fill full imageView
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glide-transformations.