TextToImageAndroid

Additional

Language
N/A
Version
1.0.4 (Jan 29, 2024)
Created
Jan 29, 2024
Updated
Jan 31, 2024
Owner
Zeki Erciyas (zekierciyas)
Contributor
Zeki Erciyas (zekierciyas)
1
Activity
Badge
Generate
Download
Source code

Android Text to Image Library

A wrapper Android library/AAR that allows creating an image from a meaningful prompt text received from the user.

In its basic usage flow, the library takes a meaningful string as input and returns the ByteArray equivalent of the created image as output.

Test Records

Show tests
Screen.Recording.2024-01-31.at.01.43.41.mov
Screen.Recording.2024-01-31.at.01.28.38.mov
Screen.Recording.2024-01-31.at.01.41.33.mov
Screen.Recording.2024-01-31.at.01.36.54.mov

Gradle

Kotlin DSL
implementation ("com.github.zekierciyas:android-text-to-image:1.0.4")
Groovy DSL
implementation 'com.github.zekierciyas:android-text-to-image:1.0.4'

Library Usage

    TextToImage.instance().process(
        input = "Photo of a cat making cake",
        dispatcher = Dispatchers.IO,
        callback = object : TextToImage.TextToImageCallback {
            override fun onSuccess(byteArray: ByteArray) {
              //Process done
              //Convert ByteArray to Bitmap/ImageBitmap
            }

            override fun onError(error: Throwable) {
              //Error happened during process
            }
        }
    )