Entry
R0 = pointer to buffer holding JPEG image
R1 = x coordinate at which to plot
R2 = y coordinate at which to plot
R3 = pointer to scale factors: 0 => no scaling
R4 = length of JPEG image, in bytes
R5 = flags:
bit 0 set => dither output when plotting 24 bit JPEG at 16bpp or below
bit 1 set => dithering (if any) is full error diffused when plotting at 8bpp
all other bits reserved (must be zero)
Exit
R0 - R5 preserved
This SWI decompresses, scales, and plots on the screen a JPEG image held in a buffer in memory.
The functionality of this call for JPEGs is similar to that of OS_SpriteOp 52 (Put sprite scaled) for sprites. The scale factors and the coordinates have exactly the same meaning, and the scaling algorithms used are the same in both calls. However, this call only supports a direct plot (ie plot action 0 of OS_SpriteOp 52).
In plotting the JPEG, the SpriteExtend module may claim extra workspace in a dynamic area to store tables etc. It keeps these cached until either is is asked to plot a different JPEG, or the user decreases the dynamic area's size. This speeds up successive replots of the same JPEG. You can find out how much extra workspace SpriteExtend will require - if any - by first calling JPEG_Info or JPEG_FileInfo. You can hence ensure there is sufficient free memory before making this call.
This call returns an error if it cannot claim sufficient memory to plot the JPEG image, or if the image appears incomplete or corrupt in some way.
This call is only available from RISC OS 3.6 onwards.
|
|
|