Remove Ecore evas dependency
[platform/core/multimedia/libmedia-thumbnail.git] / src / include / media-thumb-internal.h
1 /*
2  * libmedia-thumbnail
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Hyunjun Ko <zzoon.ko@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22
23 #include "media-thumbnail.h"
24 #include "media-thumb-error.h"
25 #include "media-thumb-types.h"
26 #include "media-thumb-debug.h"
27 #include <gdk-pixbuf/gdk-pixbuf.h>
28
29 #ifndef _MEDIA_THUMB_INTERNAL_H_
30 #define _MEDIA_THUMB_INTERNAL_H_
31
32 #define THUMB_WIDTH_MAX
33 /* The maximum of resolution to be able to get thumbnail is 3000 x 3000, except for only jpeg */
34 #define THUMB_MAX_ALLOWED_MEM_FOR_THUMB 9000000
35
36 #define THUMB_LARGE_WIDTH 320
37 #define THUMB_LARGE_HEIGHT 240
38 #define THUMB_SMALL_WIDTH 160
39 #define THUMB_SMALL_HEIGHT 120
40
41 typedef struct {
42         int size;
43         int width;
44         int height;
45         int origin_width;
46         int origin_height;
47         gboolean alpha;
48         GdkPixbuf *data;
49 } media_thumb_info;
50
51 enum Exif_Orientation {
52     NOT_AVAILABLE=0,
53     NORMAL  =1,
54     HFLIP   =2,
55     ROT_180 =3,
56     VFLIP   =4,
57     TRANSPOSE   =5,
58     ROT_90  =6,
59     TRANSVERSE  =7,
60     ROT_270 =8
61 };
62
63 typedef struct {
64         ThumbFunc func;
65         void *user_data;
66 } thumbUserData;
67
68 int
69 _media_thumb_image(const char *origin_path,
70                                         int thumb_width,
71                                         int thumb_height,
72                                         media_thumb_format format,
73                                         media_thumb_info *thumb_info,
74                                         uid_t uid);
75
76 int
77 _media_thumb_video(const char *origin_path,
78                                         int thumb_width,
79                                         int thumb_height,
80                                         media_thumb_format format,
81                                         media_thumb_info *thumb_info,
82                                         uid_t uid);
83
84 #endif /*_MEDIA_THUMB_INTERNAL_H_*/