Update Serbian translation from master branch
[wmaker-crm.git] / wrlib / imgformat.h
blob52aa93df6e2cd4ef04ab111c836dbaf038412d5f
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
32 typedef enum {
33 IM_ERROR = -1,
34 IM_UNKNOWN = 0,
35 IM_XPM = 1,
36 IM_TIFF = 2,
37 IM_PNG = 3,
38 IM_PPM = 4,
39 IM_JPEG = 5,
40 IM_GIF = 6,
41 IM_WEBP = 7
42 } WRImgFormat;
44 /* How many image types we have. */
45 /* Increase this when adding new image types! */
46 #define IM_TYPES 7
49 * Function for Loading in a specific format
51 RImage *RLoadPPM(const char *file);
53 RImage *RLoadXPM(RContext *context, const char *file);
55 #ifdef USE_TIFF
56 RImage *RLoadTIFF(const char *file, int index);
57 #endif
59 #ifdef USE_PNG
60 RImage *RLoadPNG(RContext *context, const char *file);
61 #endif
63 #ifdef USE_JPEG
64 RImage *RLoadJPEG(const char *file);
65 #endif
67 #ifdef USE_GIF
68 RImage *RLoadGIF(const char *file, int index);
69 #endif
71 #ifdef USE_WEBP
72 RImage *RLoadWEBP(const char *file);
73 #endif
75 #ifdef USE_MAGICK
76 RImage *RLoadMagick(const char *file_name);
78 void RReleaseMagick(void);
79 #endif
82 * Function for Saving in a specific format
84 Bool RSaveXPM(RImage *image, const char *filename);
86 #ifdef USE_PNG
87 Bool RSavePNG(RImage *image, const char *filename, char *title);
88 #endif
90 #ifdef USE_JPEG
91 Bool RSaveJPEG(RImage *image, const char *filename, char *title);
92 #endif
95 * Function to terminate properly
97 void RReleaseCache(void);
100 #endif