lxiv

LXIV is Android Module (Library) for managing Base64 String to Bitmap vice versa using Encoder and Decoder Builder

Лицензия

Лицензия

Группа

Группа

com.github.suganda8
Идентификатор

Идентификатор

lxiv
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

aar
Описание

Описание

lxiv
LXIV is Android Module (Library) for managing Base64 String to Bitmap vice versa using Encoder and Decoder Builder
Ссылка на сайт

Ссылка на сайт

https://github.com/suganda8/LXIV
Система контроля версий

Система контроля версий

https://github.com/suganda8/LXIV/tree/main

Скачать lxiv

Имя Файла Размер
lxiv-1.0.1.pom
lxiv-1.0.1-sources.jar 8 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.suganda8/lxiv/ -->
<dependency>
    <groupId>com.github.suganda8</groupId>
    <artifactId>lxiv</artifactId>
    <version>1.0.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.suganda8/lxiv/
implementation 'com.github.suganda8:lxiv:1.0.1'
// https://jarcasting.com/artifacts/com.github.suganda8/lxiv/
implementation ("com.github.suganda8:lxiv:1.0.1")
'com.github.suganda8:lxiv:aar:1.0.1'
<dependency org="com.github.suganda8" name="lxiv" rev="1.0.1">
  <artifact name="lxiv" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.github.suganda8', module='lxiv', version='1.0.1')
)
libraryDependencies += "com.github.suganda8" % "lxiv" % "1.0.1"
[com.github.suganda8/lxiv "1.0.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.30

Модули Проекта

Данный проект не имеет модулей.

LXIV

Maven Central

LXIV is Base64 encoder and decoder to convert Base64 String to Bitmap, or Bitmap to Base64. Using builder pattern to make sure your development easy and take less time.

Download

Download the source code from GitHub's releases page or using Gradle, Maven, Jitpack (soon).

Using Gradle (Project):

repositories {
    // Add Maven Central repository
    mavenCentral()
}

then, add LXIV in Gradle (Module):

dependencies {
    // Using Gradle Groovy DSL
    implementation 'com.github.suganda8:lxiv:1.0.1'

    // Using Gradle Kotlin DSL
    // implementation("com.github.suganda8:lxiv:1.0.1")
}

Using Maven:

<dependency>
  <groupId>com.github.suganda8</groupId>
  <artifactId>lxiv</artifactId>
  <version>1.0.1</version>
  <type>aar</type>
</dependency>

For info on using the bleeding edge, see the Snapshots (soon) docs page.

Usage

Build encoder from uri to base64 string

// Get uri from intent's data
val uri = data.data

// Encode Uri (You should do this in background)
val base64EncodedString = LXIV.createEncoder().fromUri(requireContext()) {
    // Input is depends, fromUri or fromBitmap.
    it.input = uri
    it.quality = 75
    it.compressFormat = Bitmap.CompressFormat.JPEG
    // You could leave or not setting up the flag
    it.flag = Base64.DEFAULT
}

Build decoder from base64 string to bitmap

// Decode Base64 String
val bitmap = LXIV.createDecoder().asBitmap {
    // Set base64 string
    it.base64String = binding.tietDecoderBase64StringFrDecoder.text.toString()
    // You could leave or not setting up the flag
    it.flag = Base64.DEFAULT
}

// Set bitmap into ImageView
binding.imgvImageLoadedFrDecoder.setImageBitmap(bitmap)

Status

Version 1.0.1 is now released.

Developer

Tegar Bangun Suganda

@canaryv8 (Twitter)
@suganda8 (Github)

License

Copyright 2021 Tegar Bangun Suganda, ASTARIA.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Версии библиотеки

Версия
1.0.1
1.0.0