module

CrImage::Format::Open

Provides a convenience method for opening up image files from the filesystem. Currently supports:

  • PPM (.ppm)
  • WebP (.webp)
  • JPEG (.jpeg, .jpg)
  • PNG (.png)
image = CrImage::RGBAImage.open("image.jpg")

See Save for a convenience method to write to the filesystem.

Instance methods

open(filename : String) : self

Reads this image from file using the provided filename.

Source