mirror of
https://github.com/wasabeef/glide-transformations.git
synced 2025-06-08 23:44:04 +08:00
commit
c3f09cdd0d
@ -1,6 +1,13 @@
|
|||||||
Change Log
|
Change Log
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
Version 2.0.1 *(2016-04-21)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Fix:
|
||||||
|
[#35](https://github.com/wasabeef/glide-transformations/issues/35)
|
||||||
|
RSInvalidStateException
|
||||||
|
|
||||||
Version 2.0.0 *(2016-03-02)*
|
Version 2.0.0 *(2016-03-02)*
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'jp.wasabeef:glide-transformations:2.0.0'
|
compile 'jp.wasabeef:glide-transformations:2.0.1'
|
||||||
// If you want to use the GPU Filters
|
// If you want to use the GPU Filters
|
||||||
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
|
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.0.0-beta6'
|
classpath 'com.android.tools.build:gradle:2.0.0'
|
||||||
classpath 'com.novoda:bintray-release:0.3.4'
|
classpath 'com.novoda:bintray-release:0.3.4'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
VERSION_NAME=2.0.0
|
VERSION_NAME=2.0.1
|
||||||
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=23.1.1
|
SUPPORT_PACKAGE_VERSION=23.2.1
|
||||||
GLIDE_VERSION=3.7.0
|
GLIDE_VERSION=3.7.0
|
||||||
GPUIMAGE_VERSION=1.3.0
|
GPUIMAGE_VERSION=1.3.0
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,5 +3,5 @@ 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-2.11-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public class BlurTransformation implements Transformation<Bitmap> {
|
|||||||
paint.setFlags(Paint.FILTER_BITMAP_FLAG);
|
paint.setFlags(Paint.FILTER_BITMAP_FLAG);
|
||||||
canvas.drawBitmap(source, 0, 0, paint);
|
canvas.drawBitmap(source, 0, 0, paint);
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||||
try {
|
try {
|
||||||
bitmap = RSBlur.blur(mContext, bitmap, mRadius);
|
bitmap = RSBlur.blur(mContext, bitmap, mRadius);
|
||||||
} catch (RSRuntimeException e) {
|
} catch (RSRuntimeException e) {
|
||||||
|
@ -28,11 +28,12 @@ import android.renderscript.ScriptIntrinsicBlur;
|
|||||||
|
|
||||||
public class RSBlur {
|
public class RSBlur {
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
|
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
|
||||||
public static Bitmap blur(Context context, Bitmap bitmap, int radius) throws RSRuntimeException {
|
public static Bitmap blur(Context context, Bitmap bitmap, int radius) throws RSRuntimeException {
|
||||||
RenderScript rs = null;
|
RenderScript rs = null;
|
||||||
try {
|
try {
|
||||||
rs = RenderScript.create(context);
|
rs = RenderScript.create(context);
|
||||||
|
rs.setMessageHandler(new RenderScript.RSMessageHandler());
|
||||||
Allocation input =
|
Allocation input =
|
||||||
Allocation.createFromBitmap(rs, bitmap, Allocation.MipmapControl.MIPMAP_NONE,
|
Allocation.createFromBitmap(rs, bitmap, Allocation.MipmapControl.MIPMAP_NONE,
|
||||||
Allocation.USAGE_SCRIPT);
|
Allocation.USAGE_SCRIPT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user