Surface.createImage

From Spheriki

Jump to: navigation, search

Convert the surface into an image.


Contents

Usage

Image surface.createImage();
  • surface Sphere Surface object. The surface to convert.
  • image is returned, which is a Sphere Image object holding the same image data that surface holds.


Examples

Here is a contrived example which loads a surface from a PNG file, and then converts it into an image:

var surface = LoadSurface("bleh.png");
var image = surface.createImage();

The image will now contain the PNG data as well.


Notes

  • The complement of this function is Image.createSurface(), which creates a surface from an image.


See also

Personal tools