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.cr

Instance Method Summary

Instance Method Detail

def to_ppm(io : IO) : Nil #

Output this image to io using PPM image encoding


[View source]