Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.idea/
.vscode/
.dart_tool
*.iml
*.iml
pubspec_overrides.yaml
8 changes: 0 additions & 8 deletions image_editor/pubspec_overrides.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions image_editor_common/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 31
compileSdkVersion 35

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '11'
}

defaultConfig {
minSdkVersion 16
minSdkVersion 19
}

if (project.android.hasProperty('namespace')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import android.graphics.RectF
import com.fluttercandies.image_editor.option.draw.*

fun Bitmap.draw(option: DrawOption): Bitmap {
val newBitmap = Bitmap.createBitmap(width, height, config)
val newBitmap = Bitmap.createBitmap(width, height, config!!)
val canvas = Canvas(newBitmap)
canvas.drawBitmap(this, 0F, 0F, null)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ImageHandler(private var bitmap: Bitmap) {
}

private fun handleMixImage(option: MixImageOpt): Bitmap {
val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config)
val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config!!)
val canvas = Canvas(newBitmap)
canvas.drawBitmap(bitmap, 0F, 0F, null)
val src = BitmapFactory.decodeByteArray(option.img, 0, option.img.count())
Expand Down Expand Up @@ -96,7 +96,7 @@ class ImageHandler(private var bitmap: Bitmap) {
}

private fun handleColor(option: ColorOption): Bitmap {
val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config)
val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config!!)
val canvas = Canvas(newBitmap)
val paint = Paint()
paint.colorFilter = ColorMatrixColorFilter(option.matrix)
Expand All @@ -105,7 +105,7 @@ class ImageHandler(private var bitmap: Bitmap) {
}

private fun handleText(option: AddTextOpt): Bitmap {
val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config)
val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config!!)
val canvas = Canvas(newBitmap)
val paint = Paint()
canvas.drawBitmap(bitmap, 0F, 0F, paint)
Expand Down
2 changes: 1 addition & 1 deletion image_editor_common/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.8.21'
repositories {
google()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://mirrors.tencent.com/gradle/gradle-7.4-all.zip
4 changes: 0 additions & 4 deletions image_editor_common/pubspec_overrides.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions image_editor_ohos/pubspec_overrides.yaml

This file was deleted.

Loading