Project

General

Profile

Have a list of supported pix formats » History » Version 2

iri, 03/29/2011 10:30 AM

1 1 iri
h1. Have a list of supported pix formats
2
3 2 iri
h2. The easier method :
4
5 1 iri
<pre><code class="c">
6 2 iri
fun main ()=
7
    _showconsole;
8
    _fooSList _gtkPixFormats;
9
    0;;
10
</code></pre>
11
12
The console could display :
13
14
<pre><code class="c">
15
tiff:jpeg:gif:bmp:emf:wmf:ico:qtif:icns:pcx:tga:xbm:xpm:ras:pnm:wbmp:png:ani:NIL
16
</code></pre>
17
18
__gtkPixFormats_ returns a simple list of all supported formats by ObjGtkPix on the current system.
19
20
h2. The full method :
21
22
Here, __gtkPixFormatsFull_ returns a list of tuples with several informations to all supported formats by ObjGtkPix on the current system.
23
24
<pre><code class="c">
25 1 iri
fun displayList2 (list, prefixe)=
26
    if list == nil then
27
        0
28
    else
29
        (
30
        _fooS strcat a hd list;
31
        displayList2 tl list prefixe
32
        );;
33
34
fun displayList (list)=
35
    if list == nil then
36
        0
37
    else
38
        let hd list -> [name mimes ext desc lic disabled] in
39
        (
40
        _fooS strcat "name = " name;
41
        displayList2 mimes "mimes = ";
42
        displayList2 ext "extensions = ";
43
        _fooS strcat "description = " desc;
44
        _fooS strcat "license = " lic;
45
        _fooS strcat "disabled = " itoa disabled;
46
        _fooS "****";
47
        displayList tl list;
48
	);;
49
50
fun main ()=
51
    _showconsole;
52
    
53
    displayList _gtkPixFormatsFull;
54
    0;;
55
</code></pre>
56
57 2 iri
The console could display ... :
58 1 iri
59
<pre>name = tiff
60
mimes = image/tiff
61
extensions = tiff
62
extensions = tif
63
description = The TIFF image format
64
license = LGPL
65
disabled = 0
66
****
67
name = jpeg
68
mimes = image/jpeg
69
extensions = jpeg
70
extensions = jpe
71
extensions = jpg
72
description = The JPEG image format
73
license = LGPL
74
disabled = 0
75
****
76
name = gif
77
mimes = image/gif
78
extensions = gif
79
description = The GIF image format
80
license = LGPL
81
disabled = 0
82
****
83
name = bmp
84
mimes = image/bmp
85
mimes = image/x-bmp
86
mimes = image/x-MS-bmp
87
extensions = bmp
88
description = The BMP image format
89
license = LGPL
90
disabled = 0
91
****
92
name = emf
93
mimes = application/emf
94
mimes = application/x-emf
95
mimes = image/x-emf
96
mimes = image/x-mgx-emf
97
extensions = emf
98
description = The EMF image format
99
license = LGPL
100
disabled = 0
101
****
102
name = wmf
103
mimes = image/x-wmf
104
extensions = wmf
105
extensions = apm
106
description = The WMF image format
107
license = LGPL
108
disabled = 0
109
****
110
name = ico
111
mimes = image/x-icon
112
mimes = image/x-ico
113
extensions = ico
114
extensions = cur
115
description = The ICO image format
116
license = LGPL
117
disabled = 0
118
****
119
name = qtif
120
mimes = image/x-quicktime
121
mimes = image/qtif
122
extensions = qtif
123
extensions = qif
124
description = The QTIF image format
125
license = LGPL
126
disabled = 0
127
****
128
name = icns
129
mimes = image/x-icns
130
extensions = icns
131
description = The ICNS image format
132
license = GPL
133
disabled = 0
134
****
135
name = pcx
136
mimes = image/x-pcx
137
extensions = pcx
138
description = The PCX image format
139
license = LGPL
140
disabled = 0
141
****
142
name = tga
143
mimes = image/x-tga
144
extensions = tga
145
extensions = targa
146
description = The Targa image format
147
license = LGPL
148
disabled = 0
149
****
150
name = xbm
151
mimes = image/x-xbitmap
152
extensions = xbm
153
description = The XBM image format
154
license = LGPL
155
disabled = 0
156
****
157
name = xpm
158
mimes = image/x-xpixmap
159
extensions = xpm
160
description = The XPM image format
161
license = LGPL
162
disabled = 0
163
****
164
name = ras
165
mimes = image/x-cmu-raster
166
mimes = image/x-sun-raster
167
extensions = ras
168
description = The Sun raster image format
169
license = LGPL
170
disabled = 0
171
****
172
name = pnm
173
mimes = image/x-portable-anymap
174
mimes = image/x-portable-bitmap
175
mimes = image/x-portable-graymap
176
mimes = image/x-portable-pixmap
177
extensions = pnm
178
extensions = pbm
179
extensions = pgm
180
extensions = ppm
181
description = The PNM/PBM/PGM/PPM image format family
182
license = LGPL
183
disabled = 0
184
****
185
name = wbmp
186
mimes = image/vnd.wap.wbmp
187
extensions = wbmp
188
description = The WBMP image format
189
license = LGPL
190
disabled = 0
191
****
192
name = png
193
mimes = image/png
194
extensions = png
195
description = The PNG image format
196
license = LGPL
197
disabled = 0
198
****
199
name = ani
200
mimes = application/x-navi-animation
201
extensions = ani
202
description = The ANI image format
203
license = LGPL
204
disabled = 0
205
****
206
</pre>
207
208
Return [[Examples]]