refhd3.gif - 11Kb


ref3sub1.gif - 15Kb
There are a variety of commands for saving/exporting images. The details vary with the type of file. The basic command is “export <type>” where <type> indicates the type of file. The saved image will be taken from the currently selected object, or the entire canvas. So to export an object you preceed the “saveimage” command with “select <object>”, or to export the entire canvas preceed with “select canvas”. Various types of image type can be exported. Here we will concentrate upon Sprites and JPEGs. Other filetypes will be dealt with on another reference page.

To export a Sprite the command has the form shown below. Note that as usual many attributes can be omitted and sensible defaults will then be used. As a result, although the following appears long and complex, you often actually only have to include the line which sets the output filename and can omit all the other settings.

export sprite
{
 filename: <filename$>
 mask: [0/1/2]
 BlendCanvas: [YES/NO]
 Append: [YES/NO]
 Spritename: <spritename$>
 CanvasArea: [YES/NO]
 Dither: [YES/NO]
 OutputFSI: [YES/NO]
 CFSICols: <cfsivalue>
 CFSIScale: <cfsiscale>
 CFSIaspect: [YES/NO]
 CFSIx: <xscale>
 CFSIy: <yscale>
 CFSISharp: [NO/<value>]
 CFSISmooth: [NO/<value>]
 CFSIGamma: [NO/<value>]
 CFSIDither: [YES/NO]
 CFSIRange: [YES/NO]

}


The items shown in red are only relevant if ‘‘OutputCFSI: YES” is selected. This causes the output to be passed to !ChangeFSI for processing. The red attributes then provide the control settings for !ChangeFSI. Note that the values “1” and “0” may be used in place of “YES” or “NO”. The meanings of the attributes and values are as given below. Most of the CFSIvalues are omitted as these refer to the settings used by that program and generally default to sensible values (mostly “NO”). You can decypher these by examining the dialogues provided by !ChangeFSI.

  meaning default
filename Name of the file the image is saved to none
mask 0 = no mask; 1 = Acorn 1bpp mask; 2 = Alpha mask No mask
BlendCanvas Blends to the canvas or underlaying objects No blend
Append Add image to any others in the output file if “YES”,
otherwise replace any previous images with the new one.
Not appended
Dither Refers to Acorn 1bpp mask. If “YES” then the 256 level mask Compo has is dithered down to 1bpp Acorn form. If “NO” then a simple cutoff threshold is used. YES
OutputFSI Process using !ChangeFSI NO
Spritename Name to give the sprite in the spritefile. This is particularly important when you are appending sprites so as to hold more than one sprite image in a single file. Same as filename
CanvasArea Include details of area of canvas covered by object NO


Note that if the output is processed through !ChangeFSI any mask info will be lost.

The meaning of the CFSICols value has a special syntax which is follows:

Each line indicates synonyms for the chosen colour depth and palette. So, for example, “CFSICols: 1” and “CFSICols: 32k” both produce the same colour depth. These synonyms only work for Compo1.18j onwards. For earlier versions on only “1” - “5” are recognised. Note that due to the behaviour of !ChangeFSI the 16 colour palette is only available when the computer is in a 16 colour screen mode.

The command for exporting as other types of file are similar and can include most of the above attributes. The following therefore concentrate on the settings and attributes that are specific to the filetype being considered.

To export a selected object as a JPEG you can use the following command.

export JPEG
{
 filename: <filename$>
 quality: <qvalue>
 progressive: [YES/NO]
}


Where <qvalue> is an integer value in the range 0 - 100. This corresponds to the quality setting you would choose when exporting via the dialog box, or when using !ChangeFSI. The larger the value, the higher the quality. By default, if this is omitted the currently set value will be used. By default the exported JPEG is not arranged to render in a ‘progressive’ manner, but “progressive: YES” can be used to create a progressive JPEG.



prevpage.gif - 1296 bytes homecc2.gif - 8Kb nextpage.gif - 1271 bytes


Content and pages maintained by: Jim Lesurf
using HTMLEdit, Compo, and TechWriter.