1
0
mirror of https://github.com/wasabeef/glide-transformations.git synced 2025-06-06 14:24:05 +08:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Daichi Furiya
074b6eef45
Release 4.2.0 (#183)
* format

* update copyright

* remove -android.namespacedRClass

* update compile&target sdk version to 30

* update dependencies

* update gitignore

* update samples dependencies

* update signinconfig

* bump up to 4.2.0

* bump up to 4.2.0
2020-09-15 03:51:31 +09:00
bigeye-wg
fa04c1b3c9
fixed drawDiagonalFromTopLeftRoundRect (#178) 2020-09-15 02:45:35 +09:00
45 changed files with 296 additions and 313 deletions

7
.editorconfig Normal file
View File

@ -0,0 +1,7 @@
[*]
indent_size = 2
max_line_length = off
insert_final_newline = true
[*.{kt, kts}]
kotlin_imports_layout = ascii

3
.gitignore vendored
View File

@ -48,6 +48,9 @@ captures/
.idea/modules.xml
.idea/navEditor.xml
.idea/markdown*
.idea/jarRepositories.xml
.idea/inspectionProfiles/Project_Default.xml
.idea/compiler.xml
projectFilesBackup/
# Keystore files

View File

@ -1,6 +1,17 @@
Change Log
==========
Version 4.2.0 *(2020-09-15)*
----------------------------
Update:
- Compile & Target SDK Version 28 -> 30
- GPUImage 2.0.3 -> 2.0.4
- Glide 4.9.0 -> 4.11.0
Bugfix:
- RoundedCornersTransformation with DIAGONAL_FROM_TOP_LEFT does not work [#178](https://github.com/wasabeef/glide-transformations/pull/178)
Version 4.1.0 *(2019-08-15)*
----------------------------

View File

@ -149,7 +149,7 @@ Thanks
License
-------
Copyright 2018 Wasabeef
Copyright (C) 2020 Wasabeef
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -1,27 +1,27 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '1.3.41'
glide_version = '4.9.0'
gpuimage_version = '2.0.3'
}
ext {
kotlin_version = '1.3.72'
glide_version = '4.11.0'
gpuimage_version = '2.0.4'
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.0-alpha05'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0-alpha10'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
repositories {
google()
jcenter()
}
}

View File

@ -8,61 +8,37 @@ android {
defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
versionCode "git rev-list origin/master --count".execute().text.toInteger()
versionCode VERSION_CODE as int
versionName VERSION_NAME
renderscriptTargetApi TARGET_SDK_VERSION as int
renderscriptSupportModeEnabled true
}
signingConfigs {
release {
storeFile file(keyStoreProperty)
keyAlias keyAliasProperty
storePassword keyStorePasswordProperty
keyPassword keyAliasPasswordProperty
}
}
// SigningConfigs
apply from: '../signingConfigs/debug.gradle', to: android
buildTypes {
debug {
debuggable true
zipAlignEnabled true
signingConfig signingConfigs.debug
}
release {
debuggable false
zipAlignEnabled true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
shrinkResources true
signingConfig signingConfigs.release
}
}
}
def getKeyStoreProperty() {
return hasProperty('WASABEEF_KEYSTORE') ? WASABEEF_KEYSTORE : "debug.keystore"
}
def getKeyAliasProperty() {
return hasProperty('WASABEEF_KEYALIAS') ? WASABEEF_KEYALIAS : "android"
}
def getKeyStorePasswordProperty() {
return hasProperty('WASABEEF_KEYSTOREPASSWORD') ? WASABEEF_KEYSTOREPASSWORD : "androiddebugkey"
}
def getKeyAliasPasswordProperty() {
return hasProperty('WASABEEF_KEYALIASPASSWORD') ? WASABEEF_KEYALIASPASSWORD : "android"
}
dependencies {
implementation project(':transformations')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"
implementation "jp.co.cyberagent.android:gpuimage:$gpuimage_version"
implementation "androidx.appcompat:appcompat:1.1.0-rc01"
implementation "androidx.recyclerview:recyclerview:1.1.0-beta02"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "androidx.appcompat:appcompat:1.3.0-alpha02"
implementation "androidx.recyclerview:recyclerview:1.2.0-alpha05"
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
}

View File

@ -1,23 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="jp.wasabeef.example.glide"
>
xmlns:tools="http://schemas.android.com/tools"
package="jp.wasabeef.example.glide">
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
>
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

View File

@ -1,7 +1,7 @@
package jp.wasabeef.example.glide
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -15,9 +15,9 @@ class MainActivity : AppCompatActivity() {
findViewById<RecyclerView>(R.id.list).apply {
layoutManager = LinearLayoutManager(context)
adapter = MainAdapter(context, mutableListOf(
Mask, NinePatchMask, RoundedCorners, CropTop, CropCenter, CropBottom, CropSquare, CropCircle,
CropCircleWithBorder, Grayscale, Blur, SupportRSBlur, Toon, Sepia, Contrast, Invert,
Pixel, Sketch, Swirl, Brightness, Kuawahara, Vignette
Mask, NinePatchMask, RoundedCorners, CropTop, CropCenter, CropBottom, CropSquare, CropCircle,
CropCircleWithBorder, Grayscale, Blur, SupportRSBlur, Toon, Sepia, Contrast, Invert,
Pixel, Sketch, Swirl, Brightness, Kuawahara, Vignette
))
}
}

View File

@ -25,8 +25,8 @@ import jp.wasabeef.glide.transformations.internal.Utils
* Created by Wasabeef on 2015/01/11.
*/
class MainAdapter(
private val context: Context,
private val dataSet: MutableList<Type>
private val context: Context,
private val dataSet: MutableList<Type>
) : RecyclerView.Adapter<MainAdapter.ViewHolder>() {
enum class Type {
@ -69,129 +69,129 @@ class MainAdapter(
when (dataSet[position]) {
Mask -> {
Glide.with(context)
.load(R.drawable.check)
.apply(overrideOf(266.px, 252.px))
.apply(bitmapTransform(MultiTransformation<Bitmap>(CenterCrop(),
MaskTransformation(R.drawable.mask_starfish))))
.into(holder.image)
.load(R.drawable.check)
.apply(overrideOf(266.px, 252.px))
.apply(bitmapTransform(MultiTransformation<Bitmap>(CenterCrop(),
MaskTransformation(R.drawable.mask_starfish))))
.into(holder.image)
}
NinePatchMask -> {
Glide.with(context)
.load(R.drawable.check)
.apply(overrideOf(300.px, 200.px))
.apply(bitmapTransform(MultiTransformation<Bitmap>(CenterCrop(),
MaskTransformation(R.drawable.mask_chat_right))))
.into(holder.image)
.load(R.drawable.check)
.apply(overrideOf(300.px, 200.px))
.apply(bitmapTransform(MultiTransformation<Bitmap>(CenterCrop(),
MaskTransformation(R.drawable.mask_chat_right))))
.into(holder.image)
}
CropTop -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(CropTransformation(300.px, 100.px, CropType.TOP)))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(CropTransformation(300.px, 100.px, CropType.TOP)))
.into(holder.image)
CropCenter -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(CropTransformation(300.px, 100.px, CropType.CENTER)))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(CropTransformation(300.px, 100.px, CropType.CENTER)))
.into(holder.image)
CropBottom -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(CropTransformation(300.px, 100.px, CropType.BOTTOM)))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(CropTransformation(300.px, 100.px, CropType.BOTTOM)))
.into(holder.image)
CropSquare -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(CropSquareTransformation()))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(CropSquareTransformation()))
.into(holder.image)
CropCircle -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(CropCircleTransformation()))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(CropCircleTransformation()))
.into(holder.image)
CropCircleWithBorder -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(
CropCircleWithBorderTransformation(Utils.toDp(4), Color.rgb(0, 145, 86))))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(
CropCircleWithBorderTransformation(Utils.toDp(4), Color.rgb(0, 145, 86))))
.into(holder.image)
ColorFilter -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(ColorFilterTransformation(Color.argb(80, 255, 0, 0))))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(ColorFilterTransformation(Color.argb(80, 255, 0, 0))))
.into(holder.image)
Grayscale -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(GrayscaleTransformation()))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(GrayscaleTransformation()))
.into(holder.image)
RoundedCorners -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(RoundedCornersTransformation(45, 0,
RoundedCornersTransformation.CornerType.BOTTOM)))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(RoundedCornersTransformation(120, 0,
RoundedCornersTransformation.CornerType.DIAGONAL_FROM_TOP_LEFT)))
.into(holder.image)
Blur -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(BlurTransformation(25)))
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(BlurTransformation(25)))
.into(holder.image)
SupportRSBlur -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(SupportRSBlurTransformation(25, 10)))
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(SupportRSBlurTransformation(25, 10)))
.into(holder.image)
Toon -> Glide.with(context)
.load(R.drawable.demo)
.apply(bitmapTransform(ToonFilterTransformation()))
.into(holder.image)
.load(R.drawable.demo)
.apply(bitmapTransform(ToonFilterTransformation()))
.into(holder.image)
Sepia -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(SepiaFilterTransformation()))
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(SepiaFilterTransformation()))
.into(holder.image)
Contrast -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(ContrastFilterTransformation(2.0f)))
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(ContrastFilterTransformation(2.0f)))
.into(holder.image)
Invert -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(InvertFilterTransformation()))
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(InvertFilterTransformation()))
.into(holder.image)
Pixel -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(PixelationFilterTransformation(20f)))
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(PixelationFilterTransformation(20f)))
.into(holder.image)
Sketch -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(SketchFilterTransformation()))
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(SketchFilterTransformation()))
.into(holder.image)
Swirl -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(
SwirlFilterTransformation(0.5f, 1.0f, PointF(0.5f, 0.5f))).dontAnimate())
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(
SwirlFilterTransformation(0.5f, 1.0f, PointF(0.5f, 0.5f))).dontAnimate())
.into(holder.image)
Brightness -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(BrightnessFilterTransformation(0.5f)).dontAnimate())
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(BrightnessFilterTransformation(0.5f)).dontAnimate())
.into(holder.image)
Kuawahara -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(KuwaharaFilterTransformation(25)).dontAnimate())
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(KuwaharaFilterTransformation(25)).dontAnimate())
.into(holder.image)
Vignette -> Glide.with(context)
.load(R.drawable.check)
.apply(bitmapTransform(VignetteFilterTransformation(PointF(0.5f, 0.5f),
floatArrayOf(0.0f, 0.0f, 0.0f), 0f, 0.75f)).dontAnimate())
.into(holder.image)
.load(R.drawable.check)
.apply(bitmapTransform(VignetteFilterTransformation(PointF(0.5f, 0.5f),
floatArrayOf(0.0f, 0.0f, 0.0f), 0f, 0.75f)).dontAnimate())
.into(holder.image)
}
holder.title.text = dataSet[position].name
}

View File

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
@ -13,6 +11,5 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image"
@ -19,8 +17,8 @@
app:layout_constraintBottom_toTopOf="@+id/title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
@ -30,6 +28,5 @@
android:layout_marginStart="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -17,19 +17,13 @@ org.gradle.caching=true
android.enableBuildCache=true
android.useAndroidX=true
android.enableJetifier=true
# Use R8 instead of ProGuard for code shrinking.
android.enableR8=true
android.enableR8.fullMode=true
# Enable rudimentary R class namespacing where each library only contains
# references to the resources it declares instead of declarations plus all
# transitive dependency references.
android.namespacedRClass=true
VERSION_NAME=4.1.0
VERSION_NAME=4.2.0
VERSION_CODE=420
GROUP=jp.wasabeef
COMPILE_SDK_VERSION=28
TARGET_SDK_VERSION=28
MIN_SDK_VERSION=14
COMPILE_SDK_VERSION=30
TARGET_SDK_VERSION=30
MIN_SDK_VERSION=14

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

35
gradlew vendored
View File

@ -82,6 +82,7 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@ -125,10 +126,11 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
@ -154,19 +156,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@ -175,14 +177,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

25
gradlew.bat vendored
View File

@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -51,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@ -61,28 +64,14 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell

View File

@ -0,0 +1,14 @@
signingConfigs {
debug {
storeFile file("debug.keystore")
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
}
// $ keytool -v -list -keystore
// Certificate fingerprints:
// MD5: 28:22:7C:A4:B9:2F:6E:C7:D5:58:62:48:EB:7E:82:C3
// SHA1: 94:25:A9:50:9C:0E:AE:AA:00:37:5E:D6:71:E3:BC:ED:17:E5:0C:A3
// SHA256: 04:92:39:09:3D:1C:B6:16:BE:55:58:A3:5F:3B:BB:CB:0B:E7:F1:DA:AA:26:C5:2D:BD:2F:44:CF:AE:47:CF:87

Binary file not shown.

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* Copyright 2014 Google, Inc. All rights reserved.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
@ -40,8 +40,8 @@ public abstract class BitmapTransformation implements Transformation<Bitmap> {
int outWidth, int outHeight) {
if (!Util.isValidDimensions(outWidth, outHeight)) {
throw new IllegalArgumentException(
"Cannot apply transformation on width: " + outWidth + " or height: " + outHeight
+ " less than or equal to zero and not Target.SIZE_ORIGINAL");
"Cannot apply transformation on width: " + outWidth + " or height: " + outHeight
+ " less than or equal to zero and not Target.SIZE_ORIGINAL");
}
BitmapPool bitmapPool = Glide.get(context).getBitmapPool();
Bitmap toTransform = resource.get();

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -33,7 +33,7 @@ public class BlurTransformation extends BitmapTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.BlurTransformation." + VERSION;
"jp.wasabeef.glide.transformations.BlurTransformation." + VERSION;
private static int MAX_RADIUS = 25;
private static int DEFAULT_DOWN_SAMPLING = 1;
@ -86,8 +86,8 @@ public class BlurTransformation extends BitmapTransformation {
@Override
public boolean equals(Object o) {
return o instanceof BlurTransformation &&
((BlurTransformation) o).radius == radius &&
((BlurTransformation) o).sampling == sampling;
((BlurTransformation) o).radius == radius &&
((BlurTransformation) o).sampling == sampling;
}
@Override

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -33,7 +33,7 @@ public class ColorFilterTransformation extends BitmapTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.ColorFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.ColorFilterTransformation." + VERSION;
private int color;
@ -48,7 +48,7 @@ public class ColorFilterTransformation extends BitmapTransformation {
int height = toTransform.getHeight();
Bitmap.Config config =
toTransform.getConfig() != null ? toTransform.getConfig() : Bitmap.Config.ARGB_8888;
toTransform.getConfig() != null ? toTransform.getConfig() : Bitmap.Config.ARGB_8888;
Bitmap bitmap = pool.get(width, height, config);
setCanvasBitmapDensity(toTransform, bitmap);
@ -70,7 +70,7 @@ public class ColorFilterTransformation extends BitmapTransformation {
@Override
public boolean equals(Object o) {
return o instanceof ColorFilterTransformation &&
((ColorFilterTransformation) o).color == color;
((ColorFilterTransformation) o).color == color;
}
@Override

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -35,7 +35,7 @@ public class CropCircleTransformation extends BitmapTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.CropCircleTransformation." + VERSION;
"jp.wasabeef.glide.transformations.CropCircleTransformation." + VERSION;
@Override
protected Bitmap transform(@NonNull Context context, @NonNull BitmapPool pool,

View File

@ -17,7 +17,7 @@ import java.security.MessageDigest;
import jp.wasabeef.glide.transformations.internal.Utils;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -68,10 +68,10 @@ public class CropCircleWithBorderTransformation extends BitmapTransformation {
Canvas canvas = new Canvas(bitmap);
canvas.drawCircle(
outWidth / 2f,
outHeight / 2f,
Math.max(outWidth, outHeight) / 2f - borderSize / 2f,
paint
outWidth / 2f,
outHeight / 2f,
Math.max(outWidth, outHeight) / 2f - borderSize / 2f,
paint
);
return bitmap;
@ -85,12 +85,12 @@ public class CropCircleWithBorderTransformation extends BitmapTransformation {
@Override
public boolean equals(Object o) {
return o instanceof CropCircleWithBorderTransformation &&
((CropCircleWithBorderTransformation) o).borderSize == borderSize &&
((CropCircleWithBorderTransformation) o).borderColor == borderColor;
((CropCircleWithBorderTransformation) o).borderSize == borderSize &&
((CropCircleWithBorderTransformation) o).borderColor == borderColor;
}
@Override
public int hashCode() {
return ID.hashCode() + borderSize * 100 + borderColor + 10;
}
}
}

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -30,7 +30,7 @@ public class CropSquareTransformation extends BitmapTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.CropSquareTransformation." + VERSION;
"jp.wasabeef.glide.transformations.CropSquareTransformation." + VERSION;
private int size;

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -61,7 +61,7 @@ public class CropTransformation extends BitmapTransformation {
height = height == 0 ? toTransform.getHeight() : height;
Bitmap.Config config =
toTransform.getConfig() != null ? toTransform.getConfig() : Bitmap.Config.ARGB_8888;
toTransform.getConfig() != null ? toTransform.getConfig() : Bitmap.Config.ARGB_8888;
Bitmap bitmap = pool.get(width, height, config);
bitmap.setHasAlpha(true);
@ -105,9 +105,9 @@ public class CropTransformation extends BitmapTransformation {
@Override
public boolean equals(Object o) {
return o instanceof CropTransformation &&
((CropTransformation) o).width == width &&
((CropTransformation) o).height == height &&
((CropTransformation) o).cropType == cropType;
((CropTransformation) o).width == width &&
((CropTransformation) o).height == height &&
((CropTransformation) o).cropType == cropType;
}
@Override

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -33,7 +33,7 @@ public class GrayscaleTransformation extends BitmapTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.GrayscaleTransformation." + VERSION;
"jp.wasabeef.glide.transformations.GrayscaleTransformation." + VERSION;
@Override
protected Bitmap transform(@NonNull Context context, @NonNull BitmapPool pool,
@ -42,7 +42,7 @@ public class GrayscaleTransformation extends BitmapTransformation {
int height = toTransform.getHeight();
Bitmap.Config config =
toTransform.getConfig() != null ? toTransform.getConfig() : Bitmap.Config.ARGB_8888;
toTransform.getConfig() != null ? toTransform.getConfig() : Bitmap.Config.ARGB_8888;
Bitmap bitmap = pool.get(width, height, config);
setCanvasBitmapDensity(toTransform, bitmap);

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -36,7 +36,7 @@ public class MaskTransformation extends BitmapTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.MaskTransformation." + VERSION;
"jp.wasabeef.glide.transformations.MaskTransformation." + VERSION;
private static Paint paint = new Paint();
private int maskId;
@ -83,7 +83,7 @@ public class MaskTransformation extends BitmapTransformation {
@Override
public boolean equals(Object o) {
return o instanceof MaskTransformation &&
((MaskTransformation) o).maskId == maskId;
((MaskTransformation) o).maskId == maskId;
}
@Override

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -136,47 +136,47 @@ public class RoundedCornersTransformation extends BitmapTransformation {
private void drawTopLeftRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(margin, margin, margin + diameter, margin + diameter), radius,
radius, paint);
radius, paint);
canvas.drawRect(new RectF(margin, margin + radius, margin + radius, bottom), paint);
canvas.drawRect(new RectF(margin + radius, margin, right, bottom), paint);
}
private void drawTopRightRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(right - diameter, margin, right, margin + diameter), radius,
radius, paint);
radius, paint);
canvas.drawRect(new RectF(margin, margin, right - radius, bottom), paint);
canvas.drawRect(new RectF(right - radius, margin + radius, right, bottom), paint);
}
private void drawBottomLeftRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(margin, bottom - diameter, margin + diameter, bottom), radius,
radius, paint);
radius, paint);
canvas.drawRect(new RectF(margin, margin, margin + diameter, bottom - radius), paint);
canvas.drawRect(new RectF(margin + radius, margin, right, bottom), paint);
}
private void drawBottomRightRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(right - diameter, bottom - diameter, right, bottom), radius,
radius, paint);
radius, paint);
canvas.drawRect(new RectF(margin, margin, right - radius, bottom), paint);
canvas.drawRect(new RectF(right - radius, margin, right, bottom - radius), paint);
}
private void drawTopRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(margin, margin, right, margin + diameter), radius, radius,
paint);
paint);
canvas.drawRect(new RectF(margin, margin + radius, right, bottom), paint);
}
private void drawBottomRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(margin, bottom - diameter, right, bottom), radius, radius,
paint);
paint);
canvas.drawRect(new RectF(margin, margin, right, bottom - radius), paint);
}
private void drawLeftRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(margin, margin, margin + diameter, bottom), radius, radius,
paint);
paint);
canvas.drawRect(new RectF(margin + radius, margin, right, bottom), paint);
}
@ -187,22 +187,22 @@ public class RoundedCornersTransformation extends BitmapTransformation {
private void drawOtherTopLeftRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(margin, bottom - diameter, right, bottom), radius, radius,
paint);
paint);
canvas.drawRoundRect(new RectF(right - diameter, margin, right, bottom), radius, radius, paint);
canvas.drawRect(new RectF(margin, margin, right - radius, bottom - radius), paint);
}
private void drawOtherTopRightRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(margin, margin, margin + diameter, bottom), radius, radius,
paint);
paint);
canvas.drawRoundRect(new RectF(margin, bottom - diameter, right, bottom), radius, radius,
paint);
paint);
canvas.drawRect(new RectF(margin + radius, margin, right, bottom - radius), paint);
}
private void drawOtherBottomLeftRoundRect(Canvas canvas, Paint paint, float right, float bottom) {
canvas.drawRoundRect(new RectF(margin, margin, right, margin + diameter), radius, radius,
paint);
paint);
canvas.drawRoundRect(new RectF(right - diameter, margin, right, bottom), radius, radius, paint);
canvas.drawRect(new RectF(margin, margin + radius, right - radius, bottom), paint);
}
@ -210,28 +210,28 @@ public class RoundedCornersTransformation extends BitmapTransformation {
private void drawOtherBottomRightRoundRect(Canvas canvas, Paint paint, float right,
float bottom) {
canvas.drawRoundRect(new RectF(margin, margin, right, margin + diameter), radius, radius,
paint);
paint);
canvas.drawRoundRect(new RectF(margin, margin, margin + diameter, bottom), radius, radius,
paint);
paint);
canvas.drawRect(new RectF(margin + radius, margin + radius, right, bottom), paint);
}
private void drawDiagonalFromTopLeftRoundRect(Canvas canvas, Paint paint, float right,
float bottom) {
canvas.drawRoundRect(new RectF(margin, margin, margin + diameter, margin + diameter), radius,
radius, paint);
radius, paint);
canvas.drawRoundRect(new RectF(right - diameter, bottom - diameter, right, bottom), radius,
radius, paint);
canvas.drawRect(new RectF(margin, margin + radius, right - diameter, bottom), paint);
canvas.drawRect(new RectF(margin + diameter, margin, right, bottom - radius), paint);
radius, paint);
canvas.drawRect(new RectF(margin, margin + radius, right - radius, bottom), paint);
canvas.drawRect(new RectF(margin + radius, margin, right, bottom - radius), paint);
}
private void drawDiagonalFromTopRightRoundRect(Canvas canvas, Paint paint, float right,
float bottom) {
canvas.drawRoundRect(new RectF(right - diameter, margin, right, margin + diameter), radius,
radius, paint);
radius, paint);
canvas.drawRoundRect(new RectF(margin, bottom - diameter, margin + diameter, bottom), radius,
radius, paint);
radius, paint);
canvas.drawRect(new RectF(margin, margin, right - radius, bottom - radius), paint);
canvas.drawRect(new RectF(margin + radius, margin + radius, right, bottom), paint);
}
@ -239,16 +239,16 @@ public class RoundedCornersTransformation extends BitmapTransformation {
@Override
public String toString() {
return "RoundedTransformation(radius=" + radius + ", margin=" + margin + ", diameter="
+ diameter + ", cornerType=" + cornerType.name() + ")";
+ diameter + ", cornerType=" + cornerType.name() + ")";
}
@Override
public boolean equals(Object o) {
return o instanceof RoundedCornersTransformation &&
((RoundedCornersTransformation) o).radius == radius &&
((RoundedCornersTransformation) o).diameter == diameter &&
((RoundedCornersTransformation) o).margin == margin &&
((RoundedCornersTransformation) o).cornerType == cornerType;
((RoundedCornersTransformation) o).radius == radius &&
((RoundedCornersTransformation) o).diameter == diameter &&
((RoundedCornersTransformation) o).margin == margin &&
((RoundedCornersTransformation) o).cornerType == cornerType;
}
@Override

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -36,7 +36,7 @@ public class SupportRSBlurTransformation extends BitmapTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.SupportRSBlurTransformation." + VERSION;
"jp.wasabeef.glide.transformations.SupportRSBlurTransformation." + VERSION;
private static int MAX_RADIUS = 25;
private static int DEFAULT_DOWN_SAMPLING = 1;
@ -99,8 +99,8 @@ public class SupportRSBlurTransformation extends BitmapTransformation {
@Override
public boolean equals(Object o) {
return o instanceof SupportRSBlurTransformation &&
((SupportRSBlurTransformation) o).radius == radius &&
((SupportRSBlurTransformation) o).sampling == sampling;
((SupportRSBlurTransformation) o).radius == radius &&
((SupportRSBlurTransformation) o).sampling == sampling;
}
@Override

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -29,7 +29,7 @@ public class BrightnessFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.BrightnessFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.BrightnessFilterTransformation." + VERSION;
private float brightness;
@ -52,7 +52,7 @@ public class BrightnessFilterTransformation extends GPUFilterTransformation {
@Override
public boolean equals(Object o) {
return o instanceof BrightnessFilterTransformation &&
((BrightnessFilterTransformation) o).brightness == brightness;
((BrightnessFilterTransformation) o).brightness == brightness;
}
@Override

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -29,7 +29,7 @@ public class ContrastFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.ContrastFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.ContrastFilterTransformation." + VERSION;
private float contrast;

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -33,7 +33,7 @@ public class GPUFilterTransformation extends BitmapTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation." + VERSION;
private static final byte[] ID_BYTES = ID.getBytes(CHARSET);
private GPUImageFilter gpuImageFilter;

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -29,7 +29,7 @@ public class InvertFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.InvertFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.InvertFilterTransformation." + VERSION;
public InvertFilterTransformation() {
super(new GPUImageColorInvertFilter());

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -24,7 +24,7 @@ import jp.co.cyberagent.android.gpuimage.filter.GPUImageKuwaharaFilter;
/**
* Kuwahara all the colors in the image.
*
* <p>
* The radius to sample from when creating the brush-stroke effect, with a default of 25.
* The larger the radius, the slower the filter.
*/
@ -32,7 +32,7 @@ public class KuwaharaFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.KuwaharaFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.KuwaharaFilterTransformation." + VERSION;
private int radius;

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -24,14 +24,14 @@ import jp.co.cyberagent.android.gpuimage.filter.GPUImagePixelationFilter;
/**
* Applies a Pixelation effect to the image.
*
* <p>
* The pixel with a default of 10.0.
*/
public class PixelationFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.PixelationFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.PixelationFilterTransformation." + VERSION;
private float pixel;

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,7 +31,7 @@ public class SepiaFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.SepiaFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.SepiaFilterTransformation." + VERSION;
private float intensity;

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -26,7 +26,7 @@ public class SketchFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.SketchFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.SketchFilterTransformation." + VERSION;
public SketchFilterTransformation() {
super(new GPUImageSketchFilter());

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,7 +31,7 @@ public class SwirlFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.SwirlFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.SwirlFilterTransformation." + VERSION;
private float radius;
private float angle;
@ -60,15 +60,15 @@ public class SwirlFilterTransformation extends GPUFilterTransformation {
@Override
public String toString() {
return "SwirlFilterTransformation(radius=" + radius + ",angle=" + angle + ",center="
+ center.toString() + ")";
+ center.toString() + ")";
}
@Override
public boolean equals(Object o) {
return o instanceof SwirlFilterTransformation &&
((SwirlFilterTransformation) o).radius == radius &&
((SwirlFilterTransformation) o).angle == radius &&
((SwirlFilterTransformation) o).center.equals(center.x, center.y);
((SwirlFilterTransformation) o).radius == radius &&
((SwirlFilterTransformation) o).angle == radius &&
((SwirlFilterTransformation) o).center.equals(center.x, center.y);
}
@Override

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,7 +31,7 @@ public class ToonFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.ToonFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.ToonFilterTransformation." + VERSION;
private float threshold;
private float quantizationLevels;
@ -52,14 +52,14 @@ public class ToonFilterTransformation extends GPUFilterTransformation {
@Override
public String toString() {
return "ToonFilterTransformation(threshold=" + threshold + ",quantizationLevels="
+ quantizationLevels + ")";
+ quantizationLevels + ")";
}
@Override
public boolean equals(Object o) {
return o instanceof ToonFilterTransformation &&
((ToonFilterTransformation) o).threshold == threshold &&
((ToonFilterTransformation) o).quantizationLevels == quantizationLevels;
((ToonFilterTransformation) o).threshold == threshold &&
((ToonFilterTransformation) o).quantizationLevels == quantizationLevels;
}
@Override

View File

@ -1,7 +1,7 @@
package jp.wasabeef.glide.transformations.gpu;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -34,7 +34,7 @@ public class VignetteFilterTransformation extends GPUFilterTransformation {
private static final int VERSION = 1;
private static final String ID =
"jp.wasabeef.glide.transformations.gpu.VignetteFilterTransformation." + VERSION;
"jp.wasabeef.glide.transformations.gpu.VignetteFilterTransformation." + VERSION;
private PointF center;
private float[] vignetteColor;
@ -61,22 +61,22 @@ public class VignetteFilterTransformation extends GPUFilterTransformation {
@Override
public String toString() {
return "VignetteFilterTransformation(center=" + center.toString() + ",color=" + Arrays.toString(
vignetteColor) + ",start=" + vignetteStart + ",end=" + vignetteEnd + ")";
vignetteColor) + ",start=" + vignetteStart + ",end=" + vignetteEnd + ")";
}
@Override
public boolean equals(Object o) {
return o instanceof VignetteFilterTransformation &&
((VignetteFilterTransformation) o).center.equals(center.x, center.y) &&
Arrays.equals(((VignetteFilterTransformation) o).vignetteColor, vignetteColor) &&
((VignetteFilterTransformation) o).vignetteStart == vignetteStart &&
((VignetteFilterTransformation) o).vignetteEnd == vignetteEnd;
((VignetteFilterTransformation) o).center.equals(center.x, center.y) &&
Arrays.equals(((VignetteFilterTransformation) o).vignetteColor, vignetteColor) &&
((VignetteFilterTransformation) o).vignetteStart == vignetteStart &&
((VignetteFilterTransformation) o).vignetteEnd == vignetteEnd;
}
@Override
public int hashCode() {
return ID.hashCode() + center.hashCode() + Arrays.hashCode(vignetteColor) +
(int) (vignetteStart * 100) + (int) (vignetteEnd * 10);
(int) (vignetteStart * 100) + (int) (vignetteEnd * 10);
}
@Override

View File

@ -3,7 +3,7 @@ package jp.wasabeef.glide.transformations.internal;
import android.graphics.Bitmap;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -254,4 +254,4 @@ public class FastBlur {
return (bitmap);
}
}
}

View File

@ -11,7 +11,7 @@ import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -38,7 +38,7 @@ public class RSBlur {
rs = RenderScript.create(context);
rs.setMessageHandler(new RenderScript.RSMessageHandler());
input = Allocation.createFromBitmap(rs, bitmap, Allocation.MipmapControl.MIPMAP_NONE,
Allocation.USAGE_SCRIPT);
Allocation.USAGE_SCRIPT);
output = Allocation.createTyped(rs, input.getType());
blur = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));

View File

@ -12,7 +12,7 @@ import androidx.renderscript.RenderScript;
import androidx.renderscript.ScriptIntrinsicBlur;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -39,7 +39,7 @@ public class SupportRSBlur {
rs = RenderScript.create(context);
rs.setMessageHandler(new RenderScript.RSMessageHandler());
input = Allocation.createFromBitmap(rs, bitmap, Allocation.MipmapControl.MIPMAP_NONE,
Allocation.USAGE_SCRIPT);
Allocation.USAGE_SCRIPT);
output = Allocation.createTyped(rs, input.getType());
blur = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));

View File

@ -6,7 +6,7 @@ import android.graphics.drawable.Drawable;
import android.os.Build;
/**
* Copyright (C) 2019 Wasabeef
* Copyright (C) 2020 Wasabeef
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.