AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry
     R0 = pointer to buffer holding JPEG image
     R1 = flags:
           bit 0 set => R2 = pointer to destination coordinate block, else to matrix
           bit 1 set => dither output when plotting 24 bit JPEG at 16bpp or below
           bit 2 set => dithering (if any) is full error diffused when plotting at 8bpp
           all other bits reserved (must be zero)
     R2 = pointer to destination coordinate block (if R2 bit 0 set), or pointer to Draw-style transformation matrix (if R2 bit 0 clear)
     R3 = length of JPEG image, in bytes
Exit
     R0 - R3 preserved

This SWI decompresses, transforms, 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 56 (Put sprite transformed) for sprites.  The destination coordinate block and the transformation matrix have exactly the same meaning.  However, this call only supports a direct plot (ie plot action 0 of OS_SpriteOp 56).

Under RISC OS 3.6 this call only supports simple scaling, with no rotation or other transformation involved.  Any unsupported transformation gives an appropriate error.

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 it is asked to plot a different 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.

[sh-index] Back to list of manuals