Moved declaration of format-specific image Load functions to dedicated header
[wmaker-crm.git] / wrlib / imgformat.h
blobf6e5b883357b4f9488cd07c0a5f16495cc0e0e7c
1 /*
2 * Raster graphics library
4 * Copyright (c) 1997-2003 Alfredo K. Kojima
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
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 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
23 * Functions to load and save RImage from/to file in a specific file format
25 * These functions are for WRaster library's internal use only, please use
26 * the RLoadImage function defined in 'wraster.h'
29 #ifndef IMGFORMAT_INTERNAL_H
30 #define IMGFORMAT_INTERNAL_H
33 #define IM_ERROR -1
34 #define IM_UNKNOWN 0
35 #define IM_XPM 1
36 #define IM_TIFF 2
37 #define IM_PNG 3
38 #define IM_PPM 4
39 #define IM_JPEG 5
40 #define IM_GIF 6
42 /* How many image types we have. */
43 /* Increase this when adding new image types! */
44 #define IM_TYPES 6
47 * Function for Loading in a specific format
49 RImage *RLoadPPM(char *file_name);
51 RImage *RLoadXPM(RContext *context, char *file);
53 #ifdef USE_TIFF
54 RImage *RLoadTIFF(char *file, int index);
55 #endif
57 #ifdef USE_PNG
58 RImage *RLoadPNG(RContext *context, char *file);
59 #endif
61 #ifdef USE_JPEG
62 RImage *RLoadJPEG(RContext *context, char *file);
63 #endif
65 #ifdef USE_GIF
66 RImage *RLoadGIF(char *file, int index);
67 #endif
70 #endif