export - functionality for writing images into files libAfterImage/export.h
Contents
Description
ASImage2file will construct filename out of dir and file components and then will call specific filter to
write out file in requested format.
Example
asmerge.c: ASMerge.3
3rd Berkeley Distribution AfterStep v.2.2.12 export(3x)
Function
Some common flags that could be used while writing images into different file formats.
Inputs
im - Image to write out.
dir - directory name to write file into (optional, could be NULL)
file - file name with or without directory name.
type - output file format. ( see ASImageFileTypes )
params - pointer to ASImageExportParams union's member for the above type, with additional export
parameters, such as quality, compression, etc. If NULL then all defaults will be used.
Name
export - functionality for writing images into files libAfterImage/export.h
Nameasgifexportparams
- parameters for export into GIF file.
Nameasimage2File()
Nameasimageexportparams
- union of structures holding parameters for export into different file formats.
Nameasjpegexportparams
- parameters for export into JPEG file.
Nameaspngexportparams
- parameters for export into PNG file.
Nameastiffexportparams
- parameters for export into TIFF file.
Nameexport
- Image output into different file formats.
Nameexport_Grayscale
- save image as grayscale. EXPORT_ALPHA - save alpha channel if format permits EXPORT_APPEND - if format
allows multiple images - image will be appended
Notes
Some formats support compression, others support lossy compression, yet others allows you to limit number
of colors and colordepth. Each specific filter will try to interpret those parameters in its own way.
Return Value
True on success. False - failure.
See Also
ASImageFileTypes
Source
typedef union ASImageExportParams {
ASImageFileTypes type;
ASXpmExportParams xpm;
ASPngExportParams png;
ASJpegExportParams jpeg;
ASGifExportParams gif;
ASTiffExportParams tiff; }ASImageExportParams;
libAfterImage/export/ASImage2file()
Synopsis
Bool ASImage2file( ASImage *im, const char *dir, const char *file,
ASImageFileTypes type, ASImageExportParams *params );
