SaveImage()

Syntax

Result = SaveImage(#Image, Filename$ [, ImagePlugin [, Flags [, Depth]]])
Description
Saves the specified #Image to disk. By default, the saved image will be in BMP format. If function fails, 0 is returned, else all is fine. 'ImagePlugin' is an optional parameter and can be one of the following constant:
  #PB_ImagePlugin_BMP      : Save the image in BMP (default)
  #PB_ImagePlugin_JPEG     : Save the image in JPEG (UseJPEGImageEncoder() has to be used)
  #PB_ImagePlugin_JPEG2000 : Save the image in JPEG2000 (UseJPEG2000ImageEncoder() has to be used)
  #PB_ImagePlugin_PNG      : Save the image in PNG (UsePNGImageEncoder() has to be used)
'Flags' is an optional parameter depending of the plugin used. For now, only the quality setting is supported: a number from 0 (worste quality) to 10 (maximum quality). Only the JPEG and JPEG 2000 plugins currently support it (default quality is set to '7' if no flags are specified).

'Depth' is an optional parameter to set the depth which should be used when saving the picture. Valid values are 1, 4, 8, 24 and 32. The default value is the original image depth. When an image is saved using palettized depth (1, 4 or 8), the following flag is available:
  #PB_Image_FloydSteinberg: Apply a Floyd-Steinberg dithering.
For now, only BMP and PNG encoders support palettized image format (1, 4 or 8 bit).

Supported OS

All

<- ResizeImage() - Image Index