IT. Expert System.

Android Reference

EffectFactory


android.media.effect

Class EffectFactory



  • public class EffectFactory
    extends Object

    The EffectFactory class defines the list of available Effects, and provides functionality to inspect and instantiate them. Some effects may not be available on all platforms, so before creating a certain effect, the application should confirm that the effect is supported on this platform by calling isEffectSupported(String).

    • Field Detail

      • EFFECT_IDENTITY

        public static final String EFFECT_IDENTITY

        Copies the input texture to the output.

        Available parameters: None

        See Also:
        Constant Field Values
      • EFFECT_BRIGHTNESS

        public static final String EFFECT_BRIGHTNESS

        Adjusts the brightness of the image.

        Available parameters:

        Parameter nameMeaningValid values
        brightness The brightness multiplier. Positive float. 1.0 means no change; larger values will increase brightness.
        See Also:
        Constant Field Values
      • EFFECT_CONTRAST

        public static final String EFFECT_CONTRAST

        Adjusts the contrast of the image.

        Available parameters:

        Parameter nameMeaningValid values
        contrast The contrast multiplier. Float. 1.0 means no change; larger values will increase contrast.
        See Also:
        Constant Field Values
      • EFFECT_FISHEYE

        public static final String EFFECT_FISHEYE

        Applies a fisheye lens distortion to the image.

        Available parameters:

        Parameter nameMeaningValid values
        scale The scale of the distortion. Float, between 0 and 1. Zero means no distortion.
        See Also:
        Constant Field Values
      • EFFECT_BACKDROPPER

        public static final String EFFECT_BACKDROPPER

        Replaces the background of the input frames with frames from a selected video. Requires an initial learning period with only the background visible before the effect becomes active. The effect will wait until it does not see any motion in the scene before learning the background and starting the effect.

        Available parameters:

        Parameter nameMeaningValid values
        source A URI for the background video to use. This parameter must be supplied before calling apply() for the first time. String, such as from Uri.toString()

        If the update listener is set for this effect using Effect.setUpdateListener(android.media.effect.EffectUpdateListener), it will be called when the effect has finished learning the background, with a null value for the info parameter.

        See Also:
        Constant Field Values
      • EFFECT_AUTOFIX

        public static final String EFFECT_AUTOFIX

        Attempts to auto-fix the image based on histogram equalization.

        Available parameters:

        Parameter nameMeaningValid values
        scale The scale of the adjustment. Float, between 0 and 1. Zero means no adjustment, while 1 indicates the maximum amount of adjustment.
        See Also:
        Constant Field Values
      • EFFECT_BLACKWHITE

        public static final String EFFECT_BLACKWHITE

        Adjusts the range of minimal and maximal color pixel intensities.

        Available parameters:

        Parameter nameMeaningValid values
        black The value of the minimal pixel. Float, between 0 and 1.
        white The value of the maximal pixel. Float, between 0 and 1.
        See Also:
        Constant Field Values
      • EFFECT_CROP

        public static final String EFFECT_CROP

        Crops an upright rectangular area from the image. If the crop region falls outside of the image bounds, the results are undefined.

        Available parameters:

        Parameter nameMeaningValid values
        xorigin The origin's x-value. Integer, between 0 and width of the image.
        yorigin The origin's y-value. Integer, between 0 and height of the image.
        width The width of the cropped image. Integer, between 1 and the width of the image minus xorigin.
        height The height of the cropped image. Integer, between 1 and the height of the image minus yorigin.
        See Also:
        Constant Field Values
      • EFFECT_CROSSPROCESS

        public static final String EFFECT_CROSSPROCESS

        Applies a cross process effect on image, in which the red and green channels are enhanced while the blue channel is restricted.

        Available parameters: None

        See Also:
        Constant Field Values
      • EFFECT_DOCUMENTARY

        public static final String EFFECT_DOCUMENTARY

        Applies black and white documentary style effect on image..

        Available parameters: None

        See Also:
        Constant Field Values
      • EFFECT_BITMAPOVERLAY

        public static final String EFFECT_BITMAPOVERLAY

        Overlays a bitmap (with premultiplied alpha channel) onto the input image. The bitmap is stretched to fit the input image.

        Available parameters:

        Parameter nameMeaningValid values
        bitmap The overlay bitmap. A non-null Bitmap instance.
        See Also:
        Constant Field Values
      • EFFECT_DUOTONE

        public static final String EFFECT_DUOTONE

        Representation of photo using only two color tones.

        Available parameters:

        Parameter nameMeaningValid values
        first_color The first color tone. Integer, representing an ARGB color with 8 bits per channel. May be created using Color class.
        second_color The second color tone. Integer, representing an ARGB color with 8 bits per channel. May be created using Color class.
        See Also:
        Constant Field Values
      • EFFECT_FILLLIGHT

        public static final String EFFECT_FILLLIGHT

        Applies back-light filling to the image.

        Available parameters:

        Parameter nameMeaningValid values
        strength The strength of the backlight. Float, between 0 and 1. Zero means no change.
        See Also:
        Constant Field Values
      • EFFECT_FLIP

        public static final String EFFECT_FLIP

        Flips image vertically and/or horizontally.

        Available parameters:

        Parameter nameMeaningValid values
        vertical Whether to flip image vertically. Boolean
        horizontal Whether to flip image horizontally. Boolean
        See Also:
        Constant Field Values
      • EFFECT_GRAIN

        public static final String EFFECT_GRAIN

        Applies film grain effect to image.

        Available parameters:

        Parameter nameMeaningValid values
        strength The strength of the grain effect. Float, between 0 and 1. Zero means no change.
        See Also:
        Constant Field Values
      • EFFECT_GRAYSCALE

        public static final String EFFECT_GRAYSCALE

        Converts image to grayscale.

        Available parameters: None

        See Also:
        Constant Field Values
      • EFFECT_LOMOISH

        public static final String EFFECT_LOMOISH

        Applies lomo-camera style effect to image.

        Available parameters: None

        See Also:
        Constant Field Values
      • EFFECT_NEGATIVE

        public static final String EFFECT_NEGATIVE

        Inverts the image colors.

        Available parameters: None

        See Also:
        Constant Field Values
      • EFFECT_POSTERIZE

        public static final String EFFECT_POSTERIZE

        Applies posterization effect to image.

        Available parameters: None

        See Also:
        Constant Field Values
      • EFFECT_REDEYE

        public static final String EFFECT_REDEYE

        Removes red eyes on specified region.

        Available parameters:

        Parameter nameMeaningValid values
        centers Multiple center points (x, y) of the red eye regions. An array of floats, where (f[2*i], f[2*i+1]) specifies the center of the i'th eye. Coordinate values are expected to be normalized between 0 and 1.
        See Also:
        Constant Field Values
      • EFFECT_ROTATE

        public static final String EFFECT_ROTATE

        Rotates the image. The output frame size must be able to fit the rotated version of the input image. Note that the rotation snaps to a the closest multiple of 90 degrees.

        Available parameters:

        Parameter nameMeaningValid values
        angle The angle of rotation in degrees. Integer value. This will be rounded to the nearest multiple of 90.
        See Also:
        Constant Field Values
      • EFFECT_SATURATE

        public static final String EFFECT_SATURATE

        Adjusts color saturation of image.

        Available parameters:

        Parameter nameMeaningValid values
        scale The scale of color saturation. Float, between -1 and 1. 0 means no change, while -1 indicates full desaturation, i.e. grayscale.
        See Also:
        Constant Field Values
      • EFFECT_SEPIA

        public static final String EFFECT_SEPIA

        Converts image to sepia tone.

        Available parameters: None

        See Also:
        Constant Field Values
      • EFFECT_SHARPEN

        public static final String EFFECT_SHARPEN

        Sharpens the image.

        Available parameters:

        Parameter nameMeaningValid values
        scale The degree of sharpening. Float, between 0 and 1. 0 means no change.
        See Also:
        Constant Field Values
      • EFFECT_STRAIGHTEN

        public static final String EFFECT_STRAIGHTEN

        Rotates the image according to the specified angle, and crops the image so that no non-image portions are visible.

        Available parameters:

        Parameter nameMeaningValid values
        angle The angle of rotation. Float, between -45 and +45.
        See Also:
        Constant Field Values
      • EFFECT_TEMPERATURE

        public static final String EFFECT_TEMPERATURE

        Adjusts color temperature of the image.

        Available parameters:

        Parameter nameMeaningValid values
        scale The value of color temperature. Float, between 0 and 1, with 0 indicating cool, and 1 indicating warm. A value of of 0.5 indicates no change.
        See Also:
        Constant Field Values
      • EFFECT_TINT

        public static final String EFFECT_TINT

        Tints the photo with specified color.

        Available parameters:

        Parameter nameMeaningValid values
        tint The color of the tint. Integer, representing an ARGB color with 8 bits per channel. May be created using Color class.
        See Also:
        Constant Field Values
      • EFFECT_VIGNETTE

        public static final String EFFECT_VIGNETTE

        Adds a vignette effect to image, i.e. fades away the outer image edges.

        Available parameters:

        Parameter nameMeaningValid values
        scale The scale of vignetting. Float, between 0 and 1. 0 means no change.
        See Also:
        Constant Field Values
    • Method Detail

      • createEffect

        public Effect createEffect(String effectName)
        Instantiate a new effect with the given effect name.

        The effect's parameters will be set to their default values.

        Note that the EGL context associated with the current EffectContext need not be made current when creating an effect. This allows the host application to instantiate effects before any EGL context has become current.

        Parameters:
        effectName - The name of the effect to create.
        Returns:
        A new Effect instance.
        Throws:
        IllegalArgumentException - if the effect with the specified name is not supported or not known.
      • isEffectSupported

        public static boolean isEffectSupported(String effectName)
        Check if an effect is supported on this platform.

        Some effects may only be available on certain platforms. Use this method before instantiating an effect to make sure it is supported.

        Parameters:
        effectName - The name of the effect.
        Returns:
        true, if the effect is supported on this platform.
        Throws:
        IllegalArgumentException - if the effect name is not known.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 66 / 159266386. Delta: 0.04352 с