Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/demos/2_image.ae
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions libraries/Image.ae
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading