AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YDAT | YWAIT | Byzgraf | FAQs
encodeImage (Image source[, String format[, String destination]]) yoix.image
encodeImage (Image source[, String format[, Stream output]])  
encodeImage ()  
 
Encodes the supplied Image into a particular format and puts the result where specified or returns it as a String. With no arguments supplied, an Array of String values is returned that lists the recognized format names. When no format is supplied, the encoding defaults to JPEG. A destination for the encoding can be a local file or a writable URL, namely a CGI script. Alternatively, any wrtiable Stream can be supplied as an output sink. When either a destination or an output stream is supplied, the built-in returns a non-zero value on success and zero, otherwise. When these are not specified, the built-in returns a String containing the encoded image or NULL if the image could no be encoded. This built-in is recommended over encodeJPEG, which will eventually be retired.
 
 Return:   int, String or Array
 
 See Also:   decodeImage, decodeJPEG, encodeJPEG

 

Yoix is a registered trademark of AT&T Intellectual Property.