ImageData:encode
Encodes the ImageData and optionally writes it to the save directory. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis filedata = ImageData:encode( format, filename ) Arguments ImageFormat format The format to encode the image as. string filename (nil) The filename to write the file to. If nil, no file will be written but the FileData will still be returned.
Returns FileData filedata The encoded image as a new FileData o