Image.Adopt = fun (raw_image) { if (raw_image) return raw_image | [] | Image; else return NULL; }; Image.Rotate = fun (angle) { return Image.Adopt (this._Rotate(angle)); }; Image.Scale = fun (width, height) { return Image.Adopt (this._Scale(width, height)); }; Image.Text = fun (text, red, green, blue, alpha) { return Image.Adopt (Image._Text (text, red, green, blue, alpha)); }; Image |= fun (filename) { return Image.Adopt (Image._New(filename)); }; #------------------------- Compatability Functions ------------------------- fun ImageNew (filename) { return Image (filename); } fun ImageScale (image, width, height) { return image.Scale (width, height); } fun ImageRotate (image, angle) { return image.Rotate (angle); } fun ImageGetWidth (image) { return image.GetWidth (); } fun ImageGetHeight (image) { return image.GetHeight (); }