Android Image Editor

Hey guys, I'm completely new to Android development, and I would like to develop my first application, which is an image editor.

In principle, the user can adjust the brightness, contrast, black and white effects.

I would like to ask what package should I look for? I am roughly going through the Android API and I could not find any related packages.

Can anybody help me?

+3
source share
2 answers

android 2D-, BitmapDrawable PictureDrawable, Bitmap Picture. ( ) , , * Drawable .

0

:

Android -

, :

private static void setContrastScaleOnly(ColorMatrix cm, float contrast) {
    float scale = contrast + 1.f;
    float translate = (-.5f * scale + .5f) * 255.f;
        cm.set(new float[] {
               scale, 0, 0, 0, 0,
               0, scale, 0, 0, 0,
               0, 0, scale, 0, 0,
               0, 0, 0, 1, 0 });
}
private static void setContrast(ColorMatrix cm, float contrast) {
    float scale = contrast + 1.f;
    float translate = (-.5f * scale + .5f) * 255.f;
        cm.set(new float[] {
               scale, 0, 0, 0, translate,
               0, scale, 0, 0, translate,
               0, 0, scale, 0, translate,
               0, 0, 0, 1, 0 });
}

private static void setContrastTranslateOnly(ColorMatrix cm, float contrast) {
    float scale = contrast + 1.f;
    float translate = (-.5f * scale + .5f) * 255.f;
        cm.set(new float[] {
               1, 0, 0, 0, translate,
               0, 1, 0, 0, translate,
               0, 0, 1, 0, translate,
               0, 0, 0, 1, 0 });
}

onDraw , .

ti .

0

Source: https://habr.com/ru/post/1759517/


All Articles