/[projet1]/public/pc/tools/osdk/main/Osdk/_final_/documentation/doc_pictconv.htm
Defence Force logotype

Contents of /public/pc/tools/osdk/main/Osdk/_final_/documentation/doc_pictconv.htm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70 - (show annotations)
Sun May 24 19:53:20 2009 UTC (10 years, 6 months ago) by dbug
File MIME type: text/html
File size: 9247 byte(s)
Added the complete source code of the OSDK.
Projects files are available for Visual Studio 6 and .net, plus a Code::Blocks setup (everything works except PictConv that relies on FreeImage - which does not build correctly on mingw)
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
3 <HTML lang=fr dir=ltr>
4 <HEAD>
5 <meta name="robots" content="noindex">
6 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
7 <title>OSDK - PictConv</title>
8 <link href="documentation.css" rel="stylesheet" type="text/css">
9 </HEAD>
10
11 <BODY>
12
13 <hr>
14 <A href="documentation.htm"><img src="arrow_back.gif"></A>
15 <img src="pics/osdk_logo_small.png">
16 <hr>
17
18 <h1>PictConv</h1>
19
20 <p id=chapter>Description</p>
21
22 <p>PictConv is a tool that can be used to convert pictures created with a standard
23 PC paint program (PaintShopPro, PhotoShop, ...), in a format displayable on the Oric.
24 </p>
25
26
27 <p id=chapter>Utilisation</p>
28
29 <p>To convert a picture:
30 </p>
31 <pre>
32 %OSDK%\bin\PictConv [switches] source_picture destination_file
33 </pre>
34 <p>Supported formats for the source picture are BMP, PCX, PNG, TGA and TIFF.
35 </p>
36
37
38 <p id=chapter>Switches</p>
39
40 <ul>
41 <li>The -f switch control the type of picture conversion that will be performed:
42 <p>
43 <pre>
44 -f0[z] => output a MONOCHROME picture
45 -f1 => output a COLORED picture
46 -f2 => output a RGB picture
47 -f3 => output a picture using Twilight's embeded masks
48 -f4 => output a RB picture
49 -f5 => output a Shifter picture (Atari ST)
50 </pre>
51 For f0, 'z' is used to disable setting the bit 6
52 </p>
53 </li>
54
55 <li>The -d switch controls the dithering operation:
56 <p>
57 <pre>
58 -d0 => No dithering (0/1)
59 -d1 => Alternate dithering (0/0.5/1)
60 -d2 => Ordered dithering (4x4 matrix, 8 levels)
61 -d3 => Riemersma dithering (based on hilbert curves)
62 </pre>
63 </p>
64 </li>
65
66 <li>The -o switch defines the final file format:
67 <p>
68 <pre>
69 -o0 => Tape format, including a BASIC loader
70 -o1 => Tape format, simply the picture
71 -o2 => RAW format. No header.
72 -o3[label name] => C source code
73 -o4[label name] => assembler source code
74 -o5 => Output a PC picture format
75 -o6 => 2 bytes (dx,dy) size followed by RAW picture
76 -o7 => RAW palette mode
77 -o8[line:step] => BASIC source code
78 </pre>
79 For o3 and o4, if "label name" is not defined, the default "LabelPicture" is used.<br>
80 For o5, supported formats are BMP, PNG and TIFF
81 For o7 you can specify to values that will be taken respectively as the first line number and the step between lines
82 </p>
83 </li>
84
85 <li>The -t switch enable the testing mode:
86 <pre>
87 -t0 => Testing disabled
88 -t1 => Testing enabled
89 </pre>
90 </li>
91
92 <li>The -m switch defines the type of machine:
93 <pre>
94 -m0 => Oric
95 -m1 => Atari ST
96 </pre>
97 </li>
98
99 <li>The -n switch defines the number of entries per line when generating text format:
100 <pre>
101 -n16 => Output 16 values each line
102 -n40 => Output 40 values each line
103 </pre>
104 </li>
105 </ul>
106
107
108 <p id=chapter>Some picture samples</p>
109
110 <p>
111 Here are some conversion samples, with the parameters used.
112 </p>
113
114
115 <center>
116
117 <br>
118 Buffy
119 <br>
120 <img SRC="pics/buffy.jpg" WIDTH=240 HEIGHT=200>
121 <br>
122 <table cellspacing="5">
123 <tr>
124 <th></th>
125 <th>-f0</th>
126 <th>-f2</th>
127 </tr>
128 <tr>
129 <th>-d0</th>
130 <td><img SRC="pics/buffy_0_0.gif" WIDTH=240 HEIGHT=200></td>
131 <td><img SRC="pics/buffy_2_0.gif" WIDTH=240 HEIGHT=200></td>
132 </tr>
133 <tr>
134 <th>-d1</th>
135 <td><img SRC="pics/buffy_0_1.gif" WIDTH=240 HEIGHT=200></td>
136 <td><img SRC="pics/buffy_2_1.gif" WIDTH=240 HEIGHT=200></td>
137 </tr>
138 <tr>
139 <th>-d2</th>
140 <td><img SRC="pics/buffy_0_2.gif" WIDTH=240 HEIGHT=200></td>
141 <td><img SRC="pics/buffy_2_2.gif" WIDTH=240 HEIGHT=200></td>
142 </tr>
143 <tr>
144 <th>-d3</th>
145 <td><img SRC="pics/buffy_0_3.gif" WIDTH=240 HEIGHT=200></td>
146 <td><img SRC="pics/buffy_2_3.gif" WIDTH=240 HEIGHT=200></td>
147 </tr>
148 </table>
149 <br>
150
151
152 <br>
153 Mire
154 <br>
155 <img SRC="pics/mire2.gif" WIDTH=240 HEIGHT=200>
156 <br>
157 <table cellspacing="5">
158 <tr>
159 <th></th>
160 <th>-f0</th>
161 <th>-f2</th>
162 </tr>
163 <tr>
164 <th>-d0</th>
165 <td><img SRC="pics/mire2_0_0.gif" WIDTH=240 HEIGHT=200></td>
166 <td><img SRC="pics/mire2_2_0.gif" WIDTH=240 HEIGHT=200></td>
167 </tr>
168 <tr>
169 <th>-d1</th>
170 <td><img SRC="pics/mire2_0_1.gif" WIDTH=240 HEIGHT=200></td>
171 <td><img SRC="pics/mire2_2_1.gif" WIDTH=240 HEIGHT=200></td>
172 </tr>
173 <tr>
174 <th>-d2</th>
175 <td><img SRC="pics/mire2_0_2.gif" WIDTH=240 HEIGHT=200></td>
176 <td><img SRC="pics/mire2_2_2.gif" WIDTH=240 HEIGHT=200></td>
177 </tr>
178 <tr>
179 <th>-d3</th>
180 <td><img SRC="pics/mire2_0_3.gif" WIDTH=240 HEIGHT=200></td>
181 <td><img SRC="pics/mire2_2_3.gif" WIDTH=240 HEIGHT=200></td>
182 </tr>
183 </table>
184 <br>
185
186
187 <br>
188 Moxica
189 <br>
190 <img SRC="pics/moxica1.jpg" WIDTH=240 HEIGHT=200>
191 <br>
192 <table cellspacing="5">
193 <tr>
194 <th></th>
195 <th>-f0</th>
196 <th>-f2</th>
197 </tr>
198 <tr>
199 <th>-d0</th>
200 <td><img SRC="pics/moxica1_0_0.gif" WIDTH=240 HEIGHT=200></td>
201 <td><img SRC="pics/moxica1_2_0.gif" WIDTH=240 HEIGHT=200></td>
202 </tr>
203 <tr>
204 <th>-d1</th>
205 <td><img SRC="pics/moxica1_0_1.gif" WIDTH=240 HEIGHT=200></td>
206 <td><img SRC="pics/moxica1_2_1.gif" WIDTH=240 HEIGHT=200></td>
207 </tr>
208 <tr>
209 <th>-d2</th>
210 <td><img SRC="pics/moxica1_0_2.gif" WIDTH=240 HEIGHT=200></td>
211 <td><img SRC="pics/moxica1_2_2.gif" WIDTH=240 HEIGHT=200></td>
212 </tr>
213 <tr>
214 <th>-d3</th>
215 <td><img SRC="pics/moxica1_0_3.gif" WIDTH=240 HEIGHT=200></td>
216 <td><img SRC="pics/moxica1_2_3.gif" WIDTH=240 HEIGHT=200></td>
217 </tr>
218 </table>
219 <br>
220
221
222 <br>
223 Lena
224 <br>
225 <img SRC="pics/lena.gif" WIDTH=240 HEIGHT=200>
226 <br>
227 <table cellspacing="5">
228 <tr>
229 <th></th>
230 <th>-f0</th>
231 <th>-f2</th>
232 </tr>
233 <tr>
234 <th>-d0</th>
235 <td><img SRC="pics/lena_0_0.gif" WIDTH=240 HEIGHT=200></td>
236 <td><img SRC="pics/lena_2_0.gif" WIDTH=240 HEIGHT=200></td>
237 </tr>
238 <tr>
239 <th>-d1</th>
240 <td><img SRC="pics/lena_0_1.gif" WIDTH=240 HEIGHT=200></td>
241 <td><img SRC="pics/lena_2_1.gif" WIDTH=240 HEIGHT=200></td>
242 </tr>
243 <tr>
244 <th>-d2</th>
245 <td><img SRC="pics/lena_0_2.gif" WIDTH=240 HEIGHT=200></td>
246 <td><img SRC="pics/lena_2_2.gif" WIDTH=240 HEIGHT=200></td>
247 </tr>
248 <tr>
249 <th>-d3</th>
250 <td><img SRC="pics/lena_0_3.gif" WIDTH=240 HEIGHT=200></td>
251 <td><img SRC="pics/lena_2_3.gif" WIDTH=240 HEIGHT=200></td>
252 </tr>
253 </table>
254 <br>
255
256
257 </center>
258
259
260
261
262
263 <p id=chapter>Frequently Asked Questions</p>
264
265 <ul>
266 <li>
267 <p>
268 <b>In colored mode, free size pictures are not accepted. Why ???</b>
269 </p>
270 <p>
271 Try to imagine how you could scroll horizontaly a picture containing
272 attributes changes without having huge color changes. This is not possible.
273 Free vertical size is allowed anyway, but it's buggy right now :))
274 </p>
275 </li>
276
277
278 <li>
279 <p>
280 <b>In colored mode, the converted picture contains some lines that are black and white.</b>
281 </p>
282 <p>
283 These scanlines cannot be converted. A colored pictures should use Oric constraints,
284 be in at most 8 colors, no more than 2 colors per 6 pixel bloc, and so on...
285 </p>
286 </li>
287
288 <li>
289 <p>
290 <b>In colored mode, PictConv decided to use strange paper and ink changes.</b>
291 </p>
292 <p>
293 Actually PictConv simply tries all the possible combinations of paper, ink, video inverse
294 changes that could work to convert the picture. When it find one working combination,
295 it moves to the next scanline.
296 </p>
297 </li>
298 </ul>
299
300
301 <p id=chapter>History</p>
302
303 <p>Here is the list of all releases with a short description of things that changed:
304 </p>
305
306 <p id=dateentry>Version 0.011</p>
307 - Added the -o7 format to generate BASIC source codes.<br>
308 - Removed the constraints in the -f1 mode, pictures just need to be multiple of 6 in width, and no more than 240 pixel wide.
309
310 <p id=dateentry>Version 0.010</p>
311 - If there is something specified after -o3 or -o4 modes, it's used as a label name to use when generating source code data.<br>
312 - If there is a 'z' specified after -f0 mode (monochrome conversion), it means that bit 6 should not be set in converted bytes<br>
313 - Added -n switch to set the number of values per line (stolen from Bin2Txt !)<br>
314
315 <p id=dateentry>Version 0.009</p>
316 - New option for generating 'masks' in bits 6 and 7 based on what is presents in bits 0/1/2 and 3/4/5.<br>
317 (Twilighte's request for his new games)<br>
318 - Added a way to convert pictures to something that can be used on an Atari ST.<br>
319 (needed that for my entry to the 20 years anniversary Atari ST compo)<br>
320
321 <p id=dateentry>Version 0.008</p>
322 - Added "test" mode that's usefull to debug a picture in colored mode
323
324 <p id=dateentry>Version 0.007</p>
325 - Removed the timer check in the colored conversion mode. It was producing bad
326 conversion on slow computers. Anyway, if you are unlucky, a conversion could
327 now take hours to perform if the tool has to perform ALL possible combinations.
328
329 <p id=dateentry>Version 0.006</p>
330 - A message is given if the picture is not found or invalid.<br>
331 - Colored mode had some bugs: all now corrected ???<br>
332
333 <p id=dateentry>Version 0.005</p>
334 - Debugged the -o6 format.<br>
335 - Debugged the -f1 mode.<br>
336
337 <p id=dateentry>Version 0.004</p>
338 - Allow free size pictures (bigger than screen size except for colored mode)<br>
339
340 <p id=dateentry>Version 0.003</p>
341 - Riemersman dithering implemented <br>
342
343 <p id=dateentry>Version 0.002</p>
344 - New version with basic dithering<br>
345
346 <p id=dateentry>Version 0.001</p>
347 - First beta release<br>
348
349
350
351
352 <hr>
353 <A href="documentation.htm"><img src="arrow_back.gif"></A>
354 <img src="pics/osdk_logo_small.png">
355 <hr>
356
357 </BODY>
358 </HTML>
359
360

  ViewVC Help
Powered by ViewVC 1.1.26