mirror of
https://github.com/wasabeef/glide-transformations.git
synced 2025-07-01 13:52:44 +08:00
Deprecated RSBlur (#124)
This commit is contained in:
parent
0361d97018
commit
81e72fc553
@ -1,6 +1,15 @@
|
|||||||
Change Log
|
Change Log
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
Version 3.2.0 *(2018-04-10)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Update:
|
||||||
|
- Support Library 27.0.2 -> 27.1.0
|
||||||
|
|
||||||
|
Bug Fix:
|
||||||
|
- We quit use the RenderScript [#120](https://github.com/wasabeef/glide-transformations/issues/120)
|
||||||
|
|
||||||
Version 3.1.1 *(2018-02-13)*
|
Version 3.1.1 *(2018-02-13)*
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'jp.wasabeef:glide-transformations:3.1.1'
|
implementation 'jp.wasabeef:glide-transformations:3.2.0'
|
||||||
// If you want to use the GPU Filters
|
// If you want to use the GPU Filters
|
||||||
implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
|
implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ Set Glide Transform.
|
|||||||
|
|
||||||
```java
|
```java
|
||||||
Glide.with(this).load(R.drawable.demo)
|
Glide.with(this).load(R.drawable.demo)
|
||||||
.apply(bitmapTransform(new BlurTransformation(25)))
|
.apply(bitmapTransform(new BlurTransformation(25, 3)))
|
||||||
.into((ImageView) findViewById(R.id.image));
|
.into((ImageView) findViewById(R.id.image));
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
classpath 'com.android.tools.build:gradle:3.1.0'
|
||||||
classpath 'com.novoda:bintray-release:0.8.0'
|
classpath 'com.novoda:bintray-release:0.8.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
VERSION_NAME=3.1.1
|
VERSION_NAME=3.2.0
|
||||||
GROUP=jp.wasabeef
|
GROUP=jp.wasabeef
|
||||||
ARTIFACT_ID=glide-transformations
|
ARTIFACT_ID=glide-transformations
|
||||||
|
|
||||||
@ -21,6 +21,6 @@ POM_DEVELOPER_EMAIL=dadadada.chop@gmail.com
|
|||||||
POM_DEVELOPER_URL=wasabeef.jp
|
POM_DEVELOPER_URL=wasabeef.jp
|
||||||
ISSUE_URL=https://github.com/wasabeef/glide-transformations/issues
|
ISSUE_URL=https://github.com/wasabeef/glide-transformations/issues
|
||||||
|
|
||||||
SUPPORT_PACKAGE_VERSION=27.0.2
|
SUPPORT_PACKAGE_VERSION=27.1.0
|
||||||
GLIDE_VERSION=4.6.1
|
GLIDE_VERSION=4.6.1
|
||||||
GPUIMAGE_VERSION=1.4.1
|
GPUIMAGE_VERSION=1.4.1
|
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,6 @@
|
|||||||
|
#Tue Apr 10 02:12:33 JST 2018
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||||
|
@ -70,15 +70,7 @@ public class BlurTransformation extends BitmapTransformation {
|
|||||||
paint.setFlags(Paint.FILTER_BITMAP_FLAG);
|
paint.setFlags(Paint.FILTER_BITMAP_FLAG);
|
||||||
canvas.drawBitmap(toTransform, 0, 0, paint);
|
canvas.drawBitmap(toTransform, 0, 0, paint);
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
bitmap = FastBlur.blur(bitmap, radius, true);
|
||||||
try {
|
|
||||||
bitmap = RSBlur.blur(context, bitmap, radius);
|
|
||||||
} catch (RSRuntimeException e) {
|
|
||||||
bitmap = FastBlur.blur(bitmap, radius, true);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
bitmap = FastBlur.blur(bitmap, radius, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ import android.renderscript.ScriptIntrinsicBlur;
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class RSBlur {
|
public class RSBlur {
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
|
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user