-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDIMAGE.h
More file actions
67 lines (54 loc) · 2.58 KB
/
DIMAGE.h
File metadata and controls
67 lines (54 loc) · 2.58 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* Dust Ultimate Game Library (DUGL)
Copyright (C) 2025 Fakhri Feki
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
contact: libdugl(at)hotmail.com */
#ifndef DIMAGE_H_INCLUDED
#define DIMAGE_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
// IMAGE Support ============================================
// COMPRESSION
void InRLE(void *InBuffRLE,void *Out,int LenOut);
void OutRLE(void *OutBuffRLE,void *In,int LenIn,int ResHz);
int SizeOutRLE(void *In,int LenIn,int ResHz);
int InLZW(void *InBuffLZW,void *Out, int LenOut);
// BMP
int LoadBMP(DgSurf **S,const char *filename,void *PalBGR1024);
int LoadMemBMP16(DgSurf **S,void *In,int SizeIn); // load a 24bpp uncompressed BMP into a 16bpp Surf
int LoadBMP16(DgSurf **S,char *filename);
int SaveMemBMP16(DgSurf *S,void *Out); // save a 16bpp surf into a 24bpp uncompressed BMP
int SaveBMP16(DgSurf *S,char *filename);
int SizeSaveBMP16(DgSurf *S);
int LoadBMP8To16(DgSurf **S16,char *filename); // load a 8bpp BMP and convert it to 16 bpp
// GIF
int LoadMemGIF(DgSurf **S,void *In,void *PalBGR1024,int SizeIn);
int LoadGIF(DgSurf **S,char *filename,void *PalBGR1024);
int LoadMemGIF16(DgSurf **S16,void *In,int SizeIn); // load a 8bpp GIF and convert it to 16 bpp
int LoadGIF16(DgSurf **S16,char *filename);
// PCX
int LoadMemPCX(DgSurf **S,void *In,void *PalBGR1024,int SizeIn);
int LoadPCX(DgSurf **S,char *filename,void *PalBGR1024);
int LoadMemPCX16(DgSurf **S,void *In,int SizeIn); // load a 8bpp PCX and convert it to 16 bpp
int LoadPCX16(DgSurf **S,char *filename);
// PNG
int LoadPNG16(DgSurf **S,char *filename);
int LoadMemPNG16(DgSurf **S, void *In, int SizeIn);
// JPG
int LoadJPG16(DgSurf **S,char *filename);
int LoadMemJPG16(DgSurf **S,void *buffJpeg,int sizeBuff);
int SaveJPG16(DgSurf *S,char *filename,int quality);
int SaveMemJPG16(DgSurf *S,void **OutJpg, int *SizeOutJpg, int quality);
#ifdef __cplusplus
} // extern "C" {
#endif
#endif // DIMAGE_H_INCLUDED