Hello.

The news of Dilwyn about the program bmp2spr moves me to inform of an article that I have written recently for my web titled "Expressing the palette of the QL", it speaks on how turning images in RAW format to SCR format.

The article explains like using a program like Photoshop to prepare an image so that it can become a QL easily.

The article is in spanish, but if somebody is interesting, surely it will be able to use an automatic translator by Internet and to read it.

It includes a program in SuperBASIC to make the very simple conversion.

This it is the link:

http://sinclairql.info/docs/trucos/qlpal.htm

and this is a gallery with some examples:

http://sinclairql.info/docs/trucos/qlpal/galeria.htm

I'm preparing now another article to turn bmps. In both articles the limitation be in the way of screen support, since both are think for mode 4 or mode 8 screen of QL.

Next I add an example of a very short program to turn BMPs to SCR:

100 REMark bmp2scr v.1
110 REMark Javier Guerra 2004
120 :
130 fic$="example" : REMark file
140 dis$="win1_" : REMark unit
150 offs=86 : REMark header offset
160 modo=8 : REMark mode 8 or 4
170 c_fi=5 : REMark file channel
180 c_pa=6 : REMark screen channel
190 :
200 MODE modo
210 IF modo=8 THEN 220 linea=255 : valor=1.475
230 ELSE 240 linea=511 : valor=.7375
250 END IF 260 OPEN #c_pa,scr_512x256a0x0
270 SCALE #c_pa,255,0,0
280 PAPER #c_pa,7 : CLS #c_pa
290 OPEN_IN #c_fi,dis$&fic$&"_bmp"
300 :
310 REMark jummping the header
320 FOR i=1 TO offs : cab$=INKEY$(#c_fi)
330 :
340 FOR y=0 TO 255
350 FOR x=0 TO linea
360 color=CODE(INKEY$(#c_fi))
370 INK #c_pa,color
380 POINT #c_pa,x*valor,y
390 END FOR x
400 END FOR y
410 CLOSE #c_fi : CLOSE #c_pa
420 :
430 PAUSE
440 SBYTES dis$&fic$&"_scr",131072,32768
450 PRINT #0,"OK"


It is necessary to complete the values for the lines from the 130 to the 180.

The value of offs usually is always the same one when the same program of treatment of graphs is used.

This program supports BMP files of 8 bits/pixel without RLE compression.

In order to make agree the colors of the BMP with those of the trowel of the QL, it is necessary to follow the indications of the proposed article above.

If your read it, say me your opinion.

Javier Guerra
Sinclair QL Spanish Resources
http://sinclairql.info


_______________________________________________ QL-Users Mailing List http://www.quanta.org.uk/mailing.htm

Reply via email to