diff --git a/examples/demos/2_image.ae b/examples/demos/2_image.ae index dd28384b..7a0a3d85 100644 --- a/examples/demos/2_image.ae +++ b/examples/demos/2_image.ae @@ -1,7 +1,7 @@ import "Image.ae"; -def generate_image (steps:Int) : Image { +def main (steps:Int) : Image { white : Color = Color_mk 255 255 255; green : Color = Color_mk 0 255 0; image0 = Image_mk 64 64 white; diff --git a/libraries/Image.ae b/libraries/Image.ae index a1d6f8f9..0d657786 100644 --- a/libraries/Image.ae +++ b/libraries/Image.ae @@ -38,7 +38,7 @@ def Image_mk (height:{p:Int | p > 0}) (color:Color) : {i : Image | (Image_width i == width) && (Image_height i == height) } { -native "__import__('aeon.bindings.image').bindings.image.Image_mk" } +native "__import__('aeon.bindings.image').bindings.image.Image_mk(width, height, color)" } # Displays the image. # image: image to display @@ -52,7 +52,7 @@ def Image_save (image:Image) (path:String) : Unit { native "im.save(path)" } # Opens an image from a file. # path: file path # returns: loaded image -def Image_open (path:String) : Image { native "__import__('PIL.Image').Image.open" } +def Image_open (path:String) : Image { native "__import__('PIL.Image').Image.open(path)" } # Computes the mean squared error (MSE) difference between two images. # img: first image