mirror of
https://github.com/wasabeef/glide-transformations.git
synced 2025-06-08 15:34:04 +08:00
commit
c3f09cdd0d
@ -1,6 +1,13 @@
|
||||
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)*
|
||||
----------------------------
|
||||
|
||||
|
@ -33,7 +33,7 @@ repositories {
|
||||
}
|
||||
|
||||
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
|
||||
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
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'
|
||||
}
|
||||
}
|
||||
|
@ -1,58 +1,58 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion COMPILE_SDK_VERSION as int
|
||||
buildToolsVersion BUILD_TOOLS_VERSION
|
||||
compileSdkVersion COMPILE_SDK_VERSION as int
|
||||
buildToolsVersion BUILD_TOOLS_VERSION
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK_VERSION as int
|
||||
targetSdkVersion TARGET_SDK_VERSION as int
|
||||
versionCode "git rev-list origin/master --count".execute().text.toInteger()
|
||||
versionName VERSION_NAME
|
||||
}
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK_VERSION as int
|
||||
targetSdkVersion TARGET_SDK_VERSION as int
|
||||
versionCode "git rev-list origin/master --count".execute().text.toInteger()
|
||||
versionName VERSION_NAME
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(keyStoreProperty)
|
||||
keyAlias keyAliasProperty
|
||||
storePassword keyStorePasswordProperty
|
||||
keyPassword keyAliasPasswordProperty
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(keyStoreProperty)
|
||||
keyAlias keyAliasProperty
|
||||
storePassword keyStorePasswordProperty
|
||||
keyPassword keyAliasPasswordProperty
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
debuggable true
|
||||
zipAlignEnabled true
|
||||
}
|
||||
release {
|
||||
debuggable false
|
||||
zipAlignEnabled true
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
debuggable true
|
||||
zipAlignEnabled true
|
||||
}
|
||||
release {
|
||||
debuggable false
|
||||
zipAlignEnabled true
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def getKeyStoreProperty() {
|
||||
return hasProperty('WASABEEF_KEYSTORE') ? WASABEEF_KEYSTORE : "debug.keystore"
|
||||
return hasProperty('WASABEEF_KEYSTORE') ? WASABEEF_KEYSTORE : "debug.keystore"
|
||||
}
|
||||
|
||||
def getKeyAliasProperty() {
|
||||
return hasProperty('WASABEEF_KEYALIAS') ? WASABEEF_KEYALIAS : "android"
|
||||
return hasProperty('WASABEEF_KEYALIAS') ? WASABEEF_KEYALIAS : "android"
|
||||
}
|
||||
|
||||
def getKeyStorePasswordProperty() {
|
||||
return hasProperty('WASABEEF_KEYSTOREPASSWORD') ? WASABEEF_KEYSTOREPASSWORD : "androiddebugkey"
|
||||
return hasProperty('WASABEEF_KEYSTOREPASSWORD') ? WASABEEF_KEYSTOREPASSWORD : "androiddebugkey"
|
||||
}
|
||||
|
||||
def getKeyAliasPasswordProperty() {
|
||||
return hasProperty('WASABEEF_KEYALIASPASSWORD') ? WASABEEF_KEYALIASPASSWORD : "android"
|
||||
return hasProperty('WASABEEF_KEYALIASPASSWORD') ? WASABEEF_KEYALIASPASSWORD : "android"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':transformations')
|
||||
compile "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
|
||||
compile "jp.co.cyberagent.android.gpuimage:gpuimage-library:${GPUIMAGE_VERSION}"
|
||||
compile "com.android.support:appcompat-v7:${SUPPORT_PACKAGE_VERSION}"
|
||||
compile "com.android.support:recyclerview-v7:${SUPPORT_PACKAGE_VERSION}"
|
||||
compile project(':transformations')
|
||||
compile "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
|
||||
compile "jp.co.cyberagent.android.gpuimage:gpuimage-library:${GPUIMAGE_VERSION}"
|
||||
compile "com.android.support:appcompat-v7:${SUPPORT_PACKAGE_VERSION}"
|
||||
compile "com.android.support:recyclerview-v7:${SUPPORT_PACKAGE_VERSION}"
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
VERSION_NAME=2.0.0
|
||||
VERSION_NAME=2.0.1
|
||||
GROUP=jp.wasabeef
|
||||
ARTIFACT_ID=glide-transformations
|
||||
|
||||
@ -21,6 +21,6 @@ POM_DEVELOPER_EMAIL=dadadada.chop@gmail.com
|
||||
POM_DEVELOPER_URL=wasabeef.jp
|
||||
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
|
||||
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
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
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
|
||||
|
||||
|
@ -2,49 +2,49 @@ apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.novoda.bintray-release'
|
||||
|
||||
android {
|
||||
compileSdkVersion COMPILE_SDK_VERSION as int
|
||||
buildToolsVersion BUILD_TOOLS_VERSION
|
||||
compileSdkVersion COMPILE_SDK_VERSION as int
|
||||
buildToolsVersion BUILD_TOOLS_VERSION
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK_VERSION as int
|
||||
targetSdkVersion TARGET_SDK_VERSION as int
|
||||
versionCode "git rev-list origin/master --count".execute().text.toInteger()
|
||||
versionName VERSION_NAME
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK_VERSION as int
|
||||
targetSdkVersion TARGET_SDK_VERSION as int
|
||||
versionCode "git rev-list origin/master --count".execute().text.toInteger()
|
||||
versionName VERSION_NAME
|
||||
|
||||
consumerProguardFiles 'proguard-rules.txt'
|
||||
}
|
||||
consumerProguardFiles 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
|
||||
provided "jp.co.cyberagent.android.gpuimage:gpuimage-library:${GPUIMAGE_VERSION}"
|
||||
compile "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
|
||||
provided "jp.co.cyberagent.android.gpuimage:gpuimage-library:${GPUIMAGE_VERSION}"
|
||||
}
|
||||
|
||||
task androidJavadocs(type: Javadoc) {
|
||||
source = android.sourceSets.main.java.srcDirs
|
||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
||||
source = android.sourceSets.main.java.srcDirs
|
||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
||||
}
|
||||
|
||||
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
|
||||
classifier = 'javadoc'
|
||||
from androidJavadocs.destinationDir
|
||||
classifier = 'javadoc'
|
||||
from androidJavadocs.destinationDir
|
||||
}
|
||||
|
||||
task androidSourcesJar(type: Jar) {
|
||||
classifier = 'sources'
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives androidSourcesJar
|
||||
archives androidJavadocsJar
|
||||
archives androidSourcesJar
|
||||
archives androidJavadocsJar
|
||||
}
|
||||
|
||||
publish {
|
||||
userOrg = POM_DEVELOPER_ID
|
||||
groupId = GROUP
|
||||
artifactId = ARTIFACT_ID
|
||||
publishVersion = VERSION_NAME
|
||||
desc = POM_DESCRIPTION
|
||||
website = POM_URL
|
||||
userOrg = POM_DEVELOPER_ID
|
||||
groupId = GROUP
|
||||
artifactId = ARTIFACT_ID
|
||||
publishVersion = VERSION_NAME
|
||||
desc = POM_DESCRIPTION
|
||||
website = POM_URL
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import android.test.ApplicationTestCase;
|
||||
*/
|
||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
||||
|
||||
public ApplicationTest() {
|
||||
super(Application.class);
|
||||
}
|
||||
public ApplicationTest() {
|
||||
super(Application.class);
|
||||
}
|
||||
}
|
@ -88,7 +88,7 @@ public class BlurTransformation implements Transformation<Bitmap> {
|
||||
paint.setFlags(Paint.FILTER_BITMAP_FLAG);
|
||||
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 {
|
||||
bitmap = RSBlur.blur(mContext, bitmap, mRadius);
|
||||
} catch (RSRuntimeException e) {
|
||||
|
@ -28,11 +28,12 @@ import android.renderscript.ScriptIntrinsicBlur;
|
||||
|
||||
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 {
|
||||
RenderScript rs = null;
|
||||
try {
|
||||
rs = RenderScript.create(context);
|
||||
rs.setMessageHandler(new RenderScript.RSMessageHandler());
|
||||
Allocation input =
|
||||
Allocation.createFromBitmap(rs, bitmap, Allocation.MipmapControl.MIPMAP_NONE,
|
||||
Allocation.USAGE_SCRIPT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user