Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[20bb1d]: image_utils.h Maximize Restore History

Download this file

image_utils.h    40 lines (30 with data), 885 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* Image manipulation functions
*
* Project : minidlna
* Website : http://sourceforge.net/projects/minidlna/
* Author : Justin Maggard
* Copyright (c) 2009 Justin Maggard
* This software is subject to the conditions detailed in the
* LICENCE file provided in this distribution.
* */
#include <sys/types.h>
typedef u_int32_t pix;
typedef struct {
int32_t width;
int32_t height;
pix *buf;
} image;
void
image_free(image *pimage);
int
image_get_jpeg_date_xmp(const char * path, char ** date);
int
image_get_jpeg_resolution(const char * path, int * width, int * height);
image *
image_new_from_jpeg(const char * path, int is_file, const char * ptr, int size);
image *
image_resize(image * src_image, int32_t width, int32_t height);
unsigned char *
image_save_to_jpeg_buf(image * pimage, int * size);
int
image_save_to_jpeg_file(image * pimage, const char * path);