Images - JakeTurner616/pygame-lua-bindings GitHub Wiki

load_image(image_path)

Load an image from the specified path.

parameters::

  • image_path: The path to the image file to be loaded.

Returns:: The loaded image as a Pygame surface object.

Maps to::

  • pygame.image.load: This function is used internally to load an image.

draw_image(surface, image, x, y)

Draw the loaded image on the given surface at the specified coordinates.

parameters::

  • surface: The Pygame surface object on which to draw the image.
  • image: The image to draw on the surface.
  • x: The x-coordinate of the top-left corner of the image on the surface.
  • y: The y-coordinate of the top-left corner of the image on the surface.

Maps to::

  • surface.blit: This function is used internally to draw an image on a surface.

save_image(image, image_path)

Save the image to the specified path.

parameters::

  • image: The image to be saved.
  • image_path: The path where the image will be saved.

Maps to::

  • pygame.image.save: This function is used internally to save an image.