Commit 8728ed25 authored by Robert Sprowson's avatar Robert Sprowson

Further docs improvements

Output formats were only partially described, and supported
* Mention IRLAM output format switch in the CmdBasUse docs, add an example to the tests
* Explain what 'p15' is in CmdBasUse (was only explained in the input formats docs)
* Prefer S15 to S16

Delete support for C15 output. This appears to have been experimental as the resulting output had an embedded comment saying YUV but the data that followed was identical to a P15 RGB image. Also, ChangeFSI refused to load the C15 image it just wrote.
Delete support for S24 output switch. This was an undocumented alias for S32.
Add S15 as a possible output mode and prefer its use for 32k sprites - freeing up S16 for future 64k sprite support (and, logically S12 for 4k sprites).

Retagged as 'ChangeFSI-1_62'
parent 36ff2a02
......@@ -26,6 +26,7 @@ Parameters
<mode> The file format used to output the image. Valid modes are:
AIM output as AIM
IRLAM output as Irlam Instruments 24-bit
JPEG[MONO]<n> output as JPEG (JFIF); <n> sets the quality
of the output image in the range 0 to 100
p1 output as pbm (black & white), ASCII encoded
......@@ -34,11 +35,11 @@ Parameters
p4 output as pbm (black & white), binary encoded
p5 output as pgm (grey), binary encoded
p6 output as ppm (colour), binary encoded
p15 output as p15
S16,<x>,<y> output as 16bpp sprite; <x> and <y> give
pixels per inch in x and y directions
S32,<x>,<y> output as 32bpp sprite; <x> and <y> give
pixels per inch in x and y directions
p15 output as CFSI packed portable bitmap
S15,<x>,<y> output as 32k colour 16bpp sprite; <x> and <y>
give pixels per inch in x and y directions
S32,<x>,<y> output as 16M colour 32bpp sprite; <x> and <y>
give pixels per inch in x and y directions
<mode>[c|d|t|r] output as 1/2/4/8bpp sprite, in the given
mode number; suffix makes it use:
c 1bpp: clustered dithering with 4×4 cell
......
......@@ -72,6 +72,7 @@ Output formats
--------------
RISC OS sprites
AIM/Wild Vision Hawk V10, 256×256, 256 greys
Irlam Instruments 24-bit
JPEG 'JFIF' files
Portable Bit Map (pbm) ASCII and binary encoded formats
ChangeFSI packed portable bitmaps
......@@ -305,10 +306,6 @@ from Delft University of Technology and ECD Computers Delft B.V.
Recognised by file type 004 (a picture of 'Trui' with "TU" in blue).
ChangeFSI can write to this format; specify the output mode as "AIM", and
specify "=" in the sizing to get a 256 by 256 output (otherwise it will be
the same size as the source image).
No resolution specified; equal to mode 27 assumed.
The associated file <name>+ (file type 010) which contains additional
......@@ -319,7 +316,7 @@ from Delft University of Technology and ECD Computers Delft B.V.
experimentation can produce an almost reasonable pictureŒ
As a special feature, ChangeFSI will also write out files in this
format if you specify the mode string as "AIM". You should use the =
format if you specify the mode string as "AIM". You should use the "="
operation to restrict the picture to 256x256y, otherwise it will be the
same size as the input.
......@@ -379,7 +376,7 @@ Irlam Instruments YUV 411 files
Irlam Instruments 24-bit files
------------------------------
24 bit per pixel from colour scanner.
24 bit per pixel from colour scanner, 3 planes of 8 bits.
Recognised by 'Irlam' at the start of the file.
......@@ -387,7 +384,8 @@ Irlam Instruments 24-bit files
May need gamma correction.
Can be written.
As a special feature, ChangeFSI will also write out files in this
format if you specify the mode string as "IRLAM".
Windows 3 and OS/2 BMP files
----------------------------
......
......@@ -185,7 +185,7 @@ measure up against the desirable properties above:
2^24 24 Y Y - S32/p3/p6/Irlam/JPEG
2^21 21 Y Y - p6,7
2^18 18 Y Y - p6,6
2^15 15 Y Y - S16/p15/p6,5
2^15 15 Y Y - S15/p15/p6,5
2^12 12 Y Y - p6,4
512 9 Y Y - p6,3
256 grey 8 n Y - AIM/JPEGMONO
......
......@@ -193,25 +193,17 @@ DEF FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%
p6bits=8
I%=VAL MID$(m$,4)
m$=""
IF I%>0IF I%<8 p6bits=I%
IF I%>0 IF I%<8 p6bits=I%
WHEN "P15"
m=-3
m$=""
WHEN "C15"
m=-5
m$=""
WHEN "IRL"
m=-4
m$=""
p6bits=8
WHEN "S16"
WHEN "S15","S16"
m=-6
m$=""
WHEN "S24"
m=-8
m$=""
p6bits=8
REM 24bpp is an alias for 32bpp for now
WHEN "S32"
m=-8
m$=""
......@@ -2909,7 +2901,7 @@ DEF FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%
x%=sx%
y%=sy%
IF spm=18 ncol=1 ELSE ncol=15
WHEN -3,-5,-6
WHEN -3,-6
x%=sx%
y%=sy%
ncol=2^15-1
......@@ -2956,6 +2948,7 @@ DEF FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%
ENDIF
ENDCASE
IF m=-6 OR m=-7 OR m=-8 THEN
REM 32k/16M RISC OS 3.5+ sprite
nx=VAL MID$(pnm$,5)
ny=VAL MID$(pnm$,INSTR(pnm$,",",5)+1)
IF nx<>0 AND ny=0 THEN ny=nx:REM No y DPI given,make it square pixels
......@@ -3417,7 +3410,7 @@ DEF FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%
CASE m OF
WHEN -1,-9
col=0:REM Monochrome AIM and JPEG
WHEN -3,-4,-5,-6,-7,-8,-10
WHEN -3,-4,-6,-7,-8,-10
col=2
OTHERWISE
col=0
......@@ -7334,7 +7327,7 @@ DEF FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%
Y%=ysp%
PROCgetoutput(sz%,0,xwords%,Y%)
base%=ram%
WHEN -3,-5
WHEN -3
xwords%=xsp%*2
sz%=xwords%*ysp%
Y%=ysp%
......@@ -7576,7 +7569,7 @@ DEF FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%
rowstep%=xwords%*size%
colstep%=1
dist%=xsp%-1
IF m=-3 OR m=-5 OR m=-6 dist%=dist%*2
IF m=-3 OR m=-6 dist%=dist%*2
IF m=-4 OR m=-7 OR m=-10 OR m=-12 dist%=dist%*3
IF m=-8 dist%=dist%*4
IF rotate% THEN
......@@ -7594,7 +7587,7 @@ DEF FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%
dist%=(ysp%-1)*colstep%
REM -90
ENDIF
IF m=-3 OR m=-5 OR m=-6 colstep%=colstep%/2:rowstep%=rowstep%*2
IF m=-3 OR m=-6 colstep%=colstep%/2:rowstep%=rowstep%*2
IF m=-4 OR m=-7 OR m=-10 OR m=-12 colstep%=colstep%/3:rowstep%=rowstep%*3
IF m=-8 colstep%=colstep%/4:rowstep%=rowstep%*4
ENDIF
......@@ -8292,15 +8285,6 @@ DEF PROCSave
CLOSE#o%
o%=0
IF pnm$="P3" OSCLI"Settype "+f$+" &FFF"
WHEN -5
o%= OPENOUTf$
BPUT#o%,pnm$
BPUT#o%,"# "+f$+".pcm (options "+oname$+") binary encoded 15bpp (5bits y,u,v)"
BPUT#o%, STR$xsp%+" "+ STR$ysp%
BPUT#o%,"31 27 21"
SYS 12,2,o%,ram%,xsp%*ysp%*2
CLOSE#o%
o%=0
WHEN -9,-10,-11,-12
IF spritearea%=-1 AND oksave% SYS 8,10,f$,&c85,,ram%,ram%+jpegsize%
OTHERWISE
......
......@@ -813,7 +813,7 @@ DEF PROCcheckmouse(mousex%,mousey%,b%,handle%,icon%,ob%)
q%!4=24
SYS SetI,,q%
WHEN 7
PROCkillcurrent("S16,90,90")
PROCkillcurrent("S15,90,90")
!q%=output%
q%!4=18
q%!8=0
......@@ -867,7 +867,7 @@ DEF PROCcheckmouse(mousex%,mousey%,b%,handle%,icon%,ob%)
q%!4=24
SYS SetI,,q%
WHEN 13
PROCkillcurrent("S16,90,45")
PROCkillcurrent("S15,90,45")
!q%=output%
q%!4=18
q%!8=0
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment