4 * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #ifndef __CTSVC_IMAGE_UTIL_H__
20 #define __CTSVC_IMAGE_UTIL_H__
22 #include <image_util.h>
24 #define CTSVC_IMAGE_MAX_SIZE 1080
25 #define CTSVC_IMAGE_THUMBNAIL_SIZE 96
26 #define CTSVC_IMAGE_THUMBNAIL_SUFFIX "_thumbnail"
27 #define CTSVC_IMAGE_ENCODE_QUALITY 50
29 int ctsvc_image_util_get_mimetype(image_util_colorspace_e colorspace, int *p_mimetype);
30 media_format_h ctsvc_image_util_create_media_format(int mimetype, int width, int height);
31 media_packet_h ctsvc_image_util_create_media_packet(media_format_h fmt,
32 void *buffer, unsigned int buffer_size);
33 int ctsvc_image_util_rotate(media_packet_h packet, image_util_rotation_e rotation,
34 void **p_buffer, uint64_t *p_size);
35 int ctsvc_image_util_resize(media_packet_h packet, int width, int height,
36 void **p_buffer, uint64_t *p_size);
38 #endif /* __CTSVC_IMAGE_UTIL_H__ */