Skip to content

Commit

Permalink
Merge pull request #4 from forkachild/develop
Browse files Browse the repository at this point in the history
Stable
  • Loading branch information
forkachild authored May 5, 2023
2 parents 82e388e + a4d6a56 commit f057693
Show file tree
Hide file tree
Showing 77 changed files with 2,098 additions and 1,168 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Suhel Chakraborty

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Imagine
Blisteringly fast, highly optimised, easy to use, multi-stage image processing library for Android using OpenGL ES 2.0.

### Demo
A beautiful Material You themed simple image editor is provided in the `editor` module. You can refer to the source code of the same and maybe also use it.

<img alt="Screencast" height="30%" src="assets/screencast.gif" width="30%"/>

## Features
- `Layer` abstraction representing each processing stage in the pipeline
- Write only a single function in GLSL to manipulate per-pixel color
Expand All @@ -9,11 +14,6 @@ Blisteringly fast, highly optimised, easy to use, multi-stage image processing l
- Provides a `Bitmap` at final render to be used at your will

## Usage

### Demo
A beautiful Material You themed simple image editor is provided in the `editor` module. You can refer to the source code of the same and maybe also use it.

### Steps
1. Add `ImagineView` into your layout
```xml
<com.suhel.imagine.core.ImagineView
Expand Down
Binary file added assets/screencast.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 8 additions & 28 deletions editor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ android {

defaultConfig {
applicationId "com.suhel.imagine.editor"
minSdk 24
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}

buildTypes {
Expand All @@ -34,40 +31,23 @@ android {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.6'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
viewBinding true
}
}

dependencies {
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation 'androidx.activity:activity-compose:1.7.1'

implementation platform('androidx.compose:compose-bom:2022.10.00')
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00')
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest'

implementation "com.google.accompanist:accompanist-systemuicontroller:0.30.1"

implementation project(":lib")
implementation project(":library")
}
8 changes: 6 additions & 2 deletions editor/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">

<application
android:name=".ImagineApp"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
Expand All @@ -13,9 +14,12 @@
android:theme="@style/Theme.Imagine"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:name=".ui.main.MainActivity"
android:configChanges="uiMode"
android:exported="true"
android:theme="@style/Theme.Imagine">
android:screenOrientation="portrait"
android:theme="@style/Theme.Imagine"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
13 changes: 13 additions & 0 deletions editor/src/main/java/com/suhel/imagine/editor/ImagineApp.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.suhel.imagine.editor

import android.app.Application
import com.google.android.material.color.DynamicColors

class ImagineApp: Application() {

override fun onCreate() {
super.onCreate()
DynamicColors.applyToActivitiesIfAvailable(this)
}

}
242 changes: 0 additions & 242 deletions editor/src/main/java/com/suhel/imagine/editor/MainActivity.kt

This file was deleted.

Loading

0 comments on commit f057693

Please sign in to comment.