Compress Options
Media compression options for images and short videos (Sight).
Controls how images and short videos are compressed before sending. All properties have sensible defaults; only override the ones you need to customize.
val compress = CompressOptions().apply {
imageWidth = 1280
imageHeight = 1280
imageQuality = 0.82f
maxOriginalImageSize = 300
thumbnailMaxSize = 320
thumbnailMinSize = 120
thumbnailQuality = 0.35f
sightCompressWidth = 720
sightCompressHeight = 1280
}
val params = InitParams(context, "your-app-key").apply {
compressOptions = compress
}
NCEngine.initialize(params)Constructors
Properties
Max height for the original image in pixels.
Original image compression quality (0.0 ~ 1.0).
Max width for the original image in pixels.
Original image size threshold in KB.
Short video (Sight) compressed height in pixels.
Short video (Sight) compressed width in pixels.
Max thumbnail edge length in pixels.
Min thumbnail edge length in pixels.
Thumbnail compression quality (0.0 ~ 1.0).
Functions
Max height for the original image in pixels.
Original image compression quality (0.0 ~ 1.0).
Max width for the original image in pixels.
Original image size threshold in KB.
Short video (Sight) compressed height in pixels.
Short video (Sight) compressed width in pixels.
Max thumbnail edge length in pixels.
Min thumbnail edge length in pixels.
Thumbnail compression quality (0.0 ~ 1.0).
Max height for the original image in pixels.
Original image compression quality (0.0 ~ 1.0).
Max width for the original image in pixels.
Original image size threshold in KB.
Short video (Sight) compressed height in pixels.
Short video (Sight) compressed width in pixels.
Max thumbnail edge length in pixels.
Min thumbnail edge length in pixels.
Thumbnail compression quality (0.0 ~ 1.0).