home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- savers/SM_SaveMapped
- savers/SM_SavePalette
- savers/SM_SaveTrue
- savers/SM_Signatures
-
-
- saver.library/SM_SaveMapped saver.library/SM_SaveMapped
-
- NAME
- SM_SaveMapped -- Save colormapped image to disk.
-
- SYNOPSIS
- success = SM_SaveMapped ( filename, mappedimage, id, args );
- D0.L A0 A1 D0.L A2
-
- BOOL SM_SaveMapped ( char *, struct MappedImage *, int, LONG * );
-
- FUNCTION
- Write a colormapped (usually rendered) image file to disk in the file
- format that this save module supports.
-
- Currently supports up to 8 bitplane images.
-
- INPUTS
- filename -- name of file the user has selected to save the image to.
-
- mappedimage -- pointer to a MappedImage structure which describes the
- image data to save. The MappedImage fields are described below:
-
- Width, Height:
- Width and height of the image in pixels.
-
- BitMap:
- Pointer to a BitMap structure containing the image data
- for this image. The depth of the image may be obtained
- from the BitMap->Depth field. You should not rely on the
- BitMap->BytesPerRow field being an indication of the image
- width, since under AGA this may not be accurate. Under
- V39, this bitmap could very well have been allocated with
- the new graphics.library function AllocBitMap().
-
- ViewPort:
- Obsolete.
-
- Copper:
- Not used. Set to NULL.
-
- Palette.Depth:
- Number of bitplanes in the palette. Should be the same as
- the Bitmap depth.
-
- Palette.Count:
- Number of colors in the palette. Should be 1 << Depth.
-
- Palette.Table:
- Pointer to the actual colors in the palette, arranged as
- follows: R0G0B0 R1G1B1 R2G2B2 ... RnGnBn.
-
- Modes:
- View modes for the image. Under 2.0 or later, this is the
- display mode for the image.
-
- AspectX, AspectY:
- Pixel aspect ratio of image.
-
-
- RESULTS
- TRUE if successful or FALSE on failure, with an appropriate secondary
- error code set using SetError().
-
- EXAMPLE
-
- NOTES
-
- BUGS
-
- SEE ALSO
-
-
- saver.library/SM_SavePalette saver.library/SM_SavePalette
-
- NAME
- SM_SavePalette -- Save palette file to disk.
-
- SYNOPSIS
- success = SM_SavePalette ( filename, palette, id );
- D0.L A0 A1 D0.L
-
- BOOL SM_SavePalette ( char *, struct Palette *, int );
-
- FUNCTION
- This function is used to save a palette file to disk in the format
- used by this saver module. It is currently not used by ImageFX.
-
- INPUTS
- filename -- name of file the user has selected to save the palette
- to.
-
- palette -- pointer to Palette structure (see scan/loadsave.h).
-
- id -- file format "flavor" ID.
-
- RESULTS
- TRUE if successful, or FALSE on failure with a secondary error code
- set using the SetError() function.
-
- EXAMPLE
-
- NOTES
- ImageFX can currently only save palettes in ILBM format.
-
- BUGS
-
- SEE ALSO
-
-
- saver.library/SM_SaveTrue saver.library/SM_SaveTrue
-
- NAME
- SM_SaveTrue -- Save true-color image to disk.
-
- SYNOPSIS
- success = SM_SaveTrue ( filename, buffer, id, args );
- D0.L A0 A1 D0.L A2
-
- BOOL SM_SaveTrue ( char *, struct Buffer *, int, LONG * );
-
- FUNCTION
- Write a true-color (8-bit greyscale or 24-bit color) image file to
- disk in the file format that this saver module handles.
-
- INPUTS
- filename -- name of file to save the image to.
-
- buffer -- pointer to the Buffer structure describing the image to be
- saved. Some of the fields you will probably need to look at are
- as follows:
-
- Width:
- Width of the image in pixels.
-
- Height:
- Height of the image in pixels.
-
- Depth:
- Number of 8-bit chunky planes in the image (1 == greyscale
- and 3 == color).
-
- PixAspectX:
- Horizontal pixel aspect ratio.
-
- PixAspectY:
- Vertical pixel aspect ratio.
-
- DPIX:
- Horizontal dots per inch.
-
- DPIY:
- Vertical dots per inch.
-
- Buffer image data itself should only be accessed via. calls to
- GetBufLine() (see scan.library autodoc). You do not need to
- ObtainBuffer() the buffer, nor should you ReleaseBuffer() it.
-
- id -- ID number indicating what "flavor" of format the user selected
- to use in saving the image. ID's may be utilized by the saver
- module through the SM_Signatures() function.
-
- args -- Arguments from an Arexx command invocation. Most savers will
- not need to worry about this, but it can be used to allow passing
- parameters to the saver via. Arexx commands. Note that you must
- fill in the ModuleBase->CmdTable field for this to be used.
-
- RESULTS
- success -- TRUE if file loaded successfully, or FALSE if something
- goes wrong with an additional secondary error code set by using
- the SetError() function.
-
- EXAMPLE
-
- NOTES
-
- BUGS
-
- SEE ALSO
-
-
- saver.library/SM_Signatures saver.library/SM_Signatures
-
- NAME
- SM_Signatures -- Return information about this saver module.
-
- SYNOPSIS
- formatarray = SM_Signatures ();
- D0.L
-
- struct SaveFormat *SM_Signatures ( void );
-
- FUNCTION
- Return information to ImageFX about this saver module's supported file
- formats.
-
- INPUTS
- None.
-
- RESULTS
- formatarray -- pointer to an array of SaveFormat structures, each of
- which describes a type of file format this saver can save. The
- fields of the SaveFormat structure are:
-
- Name:
- Pointer to a name string for this file format.
-
- Flags:
- Flag bits for this saver module. Currently defined flag
- bits are:
-
- SAV_TRUE This module can save true color
- images.
-
- SAV_MAPPED This module can save colormapped
- (rendered) images.
-
- SAV_PALETTE This module can save palettes (you
- shouldn't ever set this for now).
-
- SAV_CMYK This format supports CMYK (currently
- unused).
-
- SAV_NOREQ User should not be prompted about
- whether he wishes to overwrite
- existing files when saving to this
- format. Useful for formats that allow
- appending (ie. anim formats).
-
- SAV_NOMASK This file format does not support mask
- planes, for saving defined region
- information.
-
- SAV_NOFILE This file format does not require a
- filename (eg. clipboard).
-
- SAV_NOICON Do not ever save an icon associated
- with this file.
-
- SAV_NOPIC Mapped format does not require a
- rendered picture to work.
-
- SAV_MULTI File format can contain multiple
- images, ie. an animation.
-
- SAV_NONAIL (2.0) Do not create an associated
- thumbnail file when saving to this
- file format.
-
- ID:
- ID number for this format "flavor". If the user chooses
- to save in this format, this ID number is passed to the
- appropriate saver function. If you return more than one
- SaveFormat structure, this can be used to distinguish
- which format the user is saving in.
-
- EXAMPLE
-
- NOTES
-
- BUGS
-
- SEE ALSO
-
-