[][src]Function photon::native::open_image

pub fn open_image(img_path: &'static str) -> PhotonImage

Open an image at a given path from the filesystem. A PhotonImage is returned.

Arguments

Example

// For example:
use photon::native::open_image;
 
// Open the image. A PhotonImage is returned.
let img: PhotonImage = open_image("images/flowers.PNG");
 
// ... image editing functionality here ...