public abstract class SCameraFilter extends 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 |
---|---|
List<String> |
getAvailableParameters()
Returns the list of keys supported by this
SCameraFilter for querying or setting with. |
SCameraFilterInfo |
getInfo()
Gets the SCameraFilterInfo.
|
Number |
getParameter(String key)
Returns the value of the specified key.
|
String |
getParameters()
Returns the value of all keys.
|
Bitmap |
processImage(Bitmap data)
Processes bitmap data.
|
Image |
processImage(Image data)
Processes image data.
|
void |
processImage(String inputFileName,
String outputFileName)
Processes image file.
|
void |
setParameter(String key,
Number value)
Sets the value of the specified key.
|
public SCameraFilterInfo getInfo()
public void setParameter(String key, 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 |
The multiplier of bright areas of color | Integer- 0 or 1. A value of 0 indicates no sound effect. |
key
- The parameter name to write.value
- The value to set.NullPointerException
- If key or value is null.IllegalArgumentException
- If key or value is invalid.getAvailableParameters()
public List<String> getAvailableParameters()
SCameraFilter
for querying or setting with.public Number getParameter(String key)
key
- The parameter name to read.NullPointerException
- if key is null.IllegalArgumentException
- if key is invalid.public String getParameters()
public Bitmap processImage(Bitmap data)
data
- Bitmap instance which the filter effect will be applied to.IllegalArgumentException
- If data is null or resolution of data is greater than 8192x8192.UnsupportedOperationException
- If the instance is created with the FILTER_TYPE_FACE_AR
type filter.public void processImage(String inputFileName, String outputFileName)
inputFileName
- file path which the filter effect will be applied to.outputFileName
- saves the file path to the filter is applied.IllegalArgumentException
- If inputFileName or outputFileName is null or jpeg resolution of inputFileName is greater than 8192x8192.UnsupportedOperationException
- If the instance is created with the FILTER_TYPE_FACE_AR
type filter.public Image processImage(Image data)
data
- Image instance which the filter effect will be applied to.IllegalArgumentException
- If data is null or resolution of data is greater than the 8192x8192.UnsupportedOperationException
- If the instance is created with the FILTER_TYPE_FACE_AR
type filter.Copyright © Samsung Electronics, Co., Ltd. All rights reserved.