Easyrs

Convenience RenderScript tools for processing common Android formats such as Bitmap and NV21.
Alternatives To Easyrs
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Small1,701
a year ago50HTML
Smallest possible syntactically valid files of different types
Twelvemonkeys1,68522473a day ago34November 21, 202262bsd-3-clauseJava
TwelveMonkeys ImageIO: Additional plug-ins and extensions for Java's ImageIO
Hrconvert2669
5 months ago8gpl-3.0PHP
A self-hosted, drag-and-drop & nosql file conversion server & share tool that supports 86 file formats in 13 languages.
Fontbuilder416
7 months ago13mitC++
Bitmap font generator
Autotrace359
7 months ago17gpl-2.0C
bitmap to vector graphics converter
Zigimg287
4 days ago41mitZig
Zig library for reading and writing different image formats
Bitsnpicas260
2 days ago12Java
Bits'N'Picas - Bitmap & Emoji Font Creation & Conversion Tools
Php Ico1761464 years ago1September 27, 20166otherPHP
PHP ICO - The PHP ICO Generator
Easyrs125
4 years ago13mitJava
Convenience RenderScript tools for processing common Android formats such as Bitmap and NV21.
Lv_font_conv12244 months ago22July 18, 20213mitJavaScript
Converts TTF/WOFF fonts to compact bitmap format
Alternatives To Easyrs
Select To Compare


Alternative Project Comparisons
Readme

easyRS

easyRS is a set of convenience RenderScript tools for processing common Android formats such as Bitmap and NV21. Currently it supports most RenderScript Intrinsics operations plus Bitmap/NV21 format conversions.

First you need to create a RenderScript context (from the support library class android.support.v8.renderscript.RenderScript):

RenderScript rs = RenderScript.create(context); // where context can be your activity, application, etc.

NV21 to Bitmap

Bitmap outputBitmap = Nv21Image.nv21ToBitmap(rs, nv21ByteArray, width, height); // where nv21ByteArray contains
                                                                                // the NV21 image data

Bitmap to NV21

Converts an Android Bitmap image to a NV21 image. Please notice that because of the NV21 format the resulting image will be resized to the nearest even sized dimensions (eg. 501x499 -> 500x498).

Nv21Image nv21Image = Nv21Image.bitmapToNV21(rs, inputBitmap);

Blend

Blends two images, with operations such as add, clear, dst, dstAtop, dstIn, dstOut, dstOver, multiply, src, srcAtop, srcIn, srcOut, srcOver, subtract, xor (see reference).

Blend.add(rs, inputBitmap, inputBitmap2); // result is written to inputBitmap2

Blur

float radius = 25.f; // where radius can be any float from 0.0f to 25.0f
Bitmap outputBitmap = Blur.blur(rs, inputBitmap, radius);

ColorMatrix

Bitmap outputBitmap = ColorMatrix.applyMatrix(rs, inputBitmap, matrix3f); // where matrix3f is a 3x3 Matrix3f
                                                                          // from the RenderScript package

Convolve

Bitmap outputBitmap = Convolve.convolve3x3(rs, inputBitmap, coefficients); // where coefficients is a 3x3 float
                                                                           // array convolve kernel

Histogram

int[] histograms = Histogram.rgbaHistograms(rs, inputBitmap); // where histograms will contain the histograms
                                                              // of each RGBA channels

LUT

Bitmap outputBitmap = Lut.applyLut(rs, inputBitmap, rgbaLut); // where rgbaLut is the Lookup Table to be applied

LUT3D

Bitmap outputBitmap = Lut3D.apply3dLut(rs, inputBitmap, cube); // where cube is the 3D Lookup Table to be applied

Resize

Bitmap outputBitmap = Resize.resize(rs, inputBitmap, targetWidth, targetHeight);

When applying operations to NV21 images, beware that conversions to/from Bitmap format are part of the processing pipeline so they have an overhead to consider and that the image will be rounded down to the nearest even integer in each dimension.

Download

You can add it to your Android project by following the example below in your app's build.gradle:

android {
    ...
    defaultConfig {
        ...
        renderscriptTargetApi 16
        renderscriptSupportModeEnabled true
    }
    ...
}

dependencies {
    ...
    compile 'io.github.silvaren:easyrs:0.5.3'
}

Make sure jcenter repository is available in your top-level or app-level build.gradle:

allprojects {
    repositories {
        ...
        jcenter()
    }
}

License

The MIT License (MIT)
Copyright (c) 2016 Renato Oliveira da Silva

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.
Popular Bitmap Projects
Popular Format Projects
Popular Media Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Format
Processing
Bitmap
Renderscript