libopenraw
thumbnails.h
1 /*
2  * libopenraw - thumbnails.h
3  *
4  * Copyright (C) 2005-2006, 2012 Hubert Figuière
5  *
6  * This library is free software: you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation, either version 3 of
9  * the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
26 #ifndef LIBOPENRAW_THUMBNAILS_H_
27 #define LIBOPENRAW_THUMBNAILS_H_
28 
29 #include <stdlib.h>
30 
31 #include <libopenraw/types.h>
32 #include <libopenraw/consts.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38  typedef struct _Thumbnail *ORThumbnailRef;
39 
48  or_error or_get_extract_thumbnail(const char* filename,
49  uint32_t preferred_size,
50  ORThumbnailRef *thumb);
51 
54  extern ORThumbnailRef
55  or_thumbnail_new(void);
56 
59  extern or_error
60  or_thumbnail_release(ORThumbnailRef thumb);
61 
64  extern or_data_type
65  or_thumbnail_format(ORThumbnailRef thumb);
66 
67  extern void *
68  or_thumbnail_data(ORThumbnailRef thumb);
69 
70  extern size_t
71  or_thumbnail_data_size(ORThumbnailRef thumb);
72 
73  extern void
74  or_thumbnail_dimensions(ORThumbnailRef thumb,
75  uint32_t *x, uint32_t *y);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 
82 #endif