Class EncodeImageOptions
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class EncodeImageOptions implements Parcelable
Options for encoding image.
-
-
Field Summary
Fields Modifier and Type Field Description private Integerqualityprivate EncodingFormatformat
-
Constructor Summary
Constructors Constructor Description EncodeImageOptions(Map<String, Object> source)EncodeImageOptions(JSONObject json)EncodeImageOptions(Integer quality, EncodingFormat format)
-
Method Summary
Modifier and Type Method Description final IntegergetQuality()Quality parameter is for jpeg only and is in range 0 to 100. final UnitsetQuality(Integer quality)Quality parameter is for jpeg only and is in range 0 to 100. final EncodingFormatgetFormat()Image format. final UnitsetFormat(EncodingFormat format)Image format. final JSONObjecttoJson(ToJsonConfiguration config)final EncodeImageOptionsclone()final static EncodeImageOptionsdefault()-
-
Constructor Detail
-
EncodeImageOptions
EncodeImageOptions(JSONObject json)
-
EncodeImageOptions
EncodeImageOptions(Integer quality, EncodingFormat format)
-
-
Method Detail
-
getQuality
final Integer getQuality()
Quality parameter is for jpeg only and is in range 0 to 100. If -1, then settings from hibernation are used. In case when the Image Ref was created with a lazy load mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by jpeg encoding/decoding.
Default is -1
-
setQuality
final Unit setQuality(Integer quality)
Quality parameter is for jpeg only and is in range 0 to 100. If -1, then settings from hibernation are used. In case when the Image Ref was created with a lazy load mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by jpeg encoding/decoding.
Default is -1
-
getFormat
final EncodingFormat getFormat()
Image format.
Default is JPEG
-
setFormat
final Unit setFormat(EncodingFormat format)
Image format.
Default is JPEG
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final EncodeImageOptions clone()
-
default
final static EncodeImageOptions default()
-
-
-
-