Image Util
Tizen offers the following image processing features:
- Conversion
You can change the colorspace format. The following tables define the supported formats.
Table: RGB pixel formats Label FOURCC in hex Bits per pixel Description RGB 0x32424752 1, 4, 8, 16, 24, 32 Alias for BI_RGB RGBA 0x41424752 16, 32 Raw RGB with alpha. Sample precision and packing is arbitrary and determined using bit masks for each component, as for BI_BITFIELDS. Table: Packed YUV formats Label FOURCC in hex Bits per pixel Description UYVY 0x59565955 16 YUV 4:2:2 (Y sample at every pixel, U and V sampled at every second pixel horizontally on each line). A macropixel contains 2 pixels in 1 u_int32. YUYV 0x56595559 16 Duplicate of YUY2. Table: Planar YUV formats Label FOURCC in hex Bits per pixel Description YV16 0x36315659 16 8-bit Y plane followed by 8-bit 2x1 subsampled V and U planes. YV12 0x32315659 12 8-bit Y plane followed by 8-bit 2x2 subsampled V and U planes. I420 0x30323449 12 8-bit Y plane followed by 8-bit 2x2 subsampled U and V planes. NV12 0x3231564E 12 8-bit Y plane followed by an interleaved U/V plane with 2x2 subsampling. NV21 0x3132564E 12 As NV12 with U and V reversed in the interleaved plane. - Resizing
You can change the image resolution.
- Rotation
You can change the image angle around the x or y axis.
- Crop
You can remove the outer parts of an image or change the aspect ratio.
You can decode and encode images with the following formats:
- Bitmap formats:
- YUV420, YUV422, RGB888, RGBA8888, BGRA8888, ARGB8888
- Input image formats for decoding:
- Only JPEG is supported when using image util
- Output image formats for encoding:
- JPEG
- Quality vs. size
Table: Quality and size comparison Image Quality Size (bytes) Compression ratio Description Highest quality (Q = 100) 83,261 2.6:1 Extremely minor artifacts High quality (Q = 50) 15,138 15:1 Initial signs of subimage artifacts Medium quality (Q = 25) 9,553 23:1 Stronger artifacts; loss of high-frequency information Low quality (Q = 10) 4,787 46:1 Severe high frequency loss; artifacts on subimage boundaries ("macroblocking") are obvious Lowest quality