public abstract class SCameraFilter
extends java.lang.Object
SCameraFilter class contains the information of filter i.e SCameraFilterInfo
.
Information about each filter is queried by SCameraFilter.getInfo()
.
SCameraFilter only supports a 8192x8192 or smaller resolution.
Also note that a filter with FILTER_TYPE_FACE_AR
is not compatible with
processImage(Bitmap)
, processImage(Image)
, processImage(String, String)
.
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getAvailableParameters()
Returns the list of keys supported by this
SCameraFilter for querying or setting with. |
SCameraFilterInfo |
getInfo()
Gets the SCameraFilterInfo.
|
java.lang.Number |
getParameter(java.lang.String key)
Returns the value of the specified key.
|
java.lang.String |
getParameters()
Returns the value of all keys.
|
android.graphics.Bitmap |
processImage(android.graphics.Bitmap data)
Processes bitmap data.
|
android.media.Image |
processImage(android.media.Image data)
Processes image data.
|
void |
processImage(java.lang.String inputFileName,
java.lang.String outputFileName)
Processes image file.
|
void |
setParameter(java.lang.String key,
java.lang.Number value)
Sets the value of the specified key.
|
public SCameraFilterInfo getInfo()
public void setParameter(java.lang.String key, java.lang.Number value)
Package : com.samsung.android.provider.filterprovider
Name : Beauty
Available parameters:
Parameter name | Meaning | Valid values |
intensity |
The beauty level. | Integer- between 0 and 4. A value of 0 indicates no change. |
Package : com.samsung.android.provider.filterprovider
Name : Brightness
Available parameters:
Parameter name | Meaning | Valid values |
intensity |
The brightness multiplier. | Integer- between -100 and 100. A value of 0 indicates no change. |
Package : com.samsung.android.provider.filterprovider
Name : Contrast
Available parameters:
Parameter name | Meaning | Valid values |
intensity |
The contrast multiplier. | Integer- between -100 and 100. A value of 0 indicates no change. |
Package : com.samsung.android.provider.filterprovider
Name : Saturate
Available parameters:
Parameter name | Meaning | Valid values |
intensity |
The contrast multiplier | Integer, between -100 and 100. A value of 0 indicates no change, while -100 indicates full desaturation |
Package : com.samsung.android.provider.filterprovider
Name : Temperature
Available parameters:
Parameter name | Meaning | Valid values |
intensity |
The value of color temperature. | Integer- between -100 and 100, A value of 0 indicates no change, while -100 indicating cool, and 100 indicating warm. |
Package : com.samsung.android.provider.filterprovider
Name : Tint Control
Available parameters:
Parameter name | Meaning | Valid values |
intensity |
The value of tint control. | Integer- between -100 and 100, A value of 0 indicates no change, while -100 indicating green, and 100 indicating magenta. |
Package : com.samsung.android.provider.filterprovider
Name : Highlights and Shadows
Available parameters:
Parameter name | Meaning | Valid values |
highlight |
The multiplier of bright areas of color | Integer- between -100 and 100. A value of 0 indicates no change. |
shadow |
The multiplier of dark areas of color | Integer- between -100 and 100. A value of 0 indicates no change. |
Type : FILTER_TYPE_FACE_AR
Available parameters:
Parameter name | Meaning | Valid values |
sound |
Whether the Face AR effect will play sound effect | Integer- 0 or 1. A value of 0 indicates no sound effect. |
Type : FILTER_TYPE_AR_EMOJI
Available parameters:
Parameter name | Meaning | Valid values |
tracking_mode |
A tracking mode to apply | Integer- 0 or 1. A value of 0 indicates normal tracking mode. 1 indicates head-only tracking mode. |
key
- The parameter name to write.value
- The value to set.java.lang.NullPointerException
- If key or value is null.java.lang.IllegalArgumentException
- If key or value is invalid.getAvailableParameters()
public java.util.List<java.lang.String> getAvailableParameters()
SCameraFilter
for querying or setting with.public java.lang.Number getParameter(java.lang.String key)
key
- The parameter name to read.java.lang.NullPointerException
- if key is null.java.lang.IllegalArgumentException
- if key is invalid.public java.lang.String getParameters()
public android.graphics.Bitmap processImage(android.graphics.Bitmap data)
data
- Bitmap instance which the filter effect will be applied to.java.lang.IllegalArgumentException
- If data is null or resolution of data is greater than 8192x8192.java.lang.UnsupportedOperationException
- If the instance is created with the FILTER_TYPE_FACE_AR
type filter.public void processImage(java.lang.String inputFileName, java.lang.String outputFileName)
inputFileName
- file path which the filter effect will be applied to.outputFileName
- saves the file path to the filter is applied.java.lang.IllegalArgumentException
- If inputFileName or outputFileName is null or jpeg resolution of inputFileName is greater than 8192x8192.java.lang.UnsupportedOperationException
- If the instance is created with the FILTER_TYPE_FACE_AR
type filter.public android.media.Image processImage(android.media.Image data)
data
- Image instance which the filter effect will be applied to.java.lang.IllegalArgumentException
- If data is null or resolution of data is greater than the 8192x8192.java.lang.UnsupportedOperationException
- If the instance is created with the FILTER_TYPE_FACE_AR
type filter.Copyright © Samsung Electronics, Co., Ltd. All rights reserved.