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 pathname of JPEG file, control character terminated
     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)

Exit
     R0 - R2 preserved

The SWI decompresses, transforms, and plots on the screen a JPEG image held in a file.

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.

The file is loaded into memory for the duration of the call, but is not cached.  This call therefore uses as much memory as loading the file into a buffer yourself and then calling JPEG_PlotTransformed, and gives you not control over whether the image remains cached.  Furthermore, although the mechanism exists to pass this call on to the printer drivers, they do not support it.  We therefore strongly recommend that you use JPEG_PlotTransformed in preference to this call.

As well as the memory to hold the file, 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, 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: enough both to hold the file, and to provide any extra workspace required.

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