module CrImage::Format::PPM
Overview
Provides methods to read from and write to PPM.
image = File.open("image.ppm") { |file| CrImage::RGBAImage.from_ppm(file) }
File.open("other_image.ppm") { |file| image.to_ppm(file) }
Alternatively, you can use the convenience methods in the Open
and Save
modules
to acheive the same thing:
image = CrImage::RGBAImage.open("image.ppm")
image.save("other_image.ppm")
Direct including types
Defined in:
cr-image/format/ppm.crInstance Method Summary
-
#to_ppm(io : IO) : Nil
Output this image to
io
using PPM image encoding