module CrImage::Format::PNG
Overview
Provides methods to read from and write to PNG. Requires libspng
to function.
image = File.open("image.png") { |file| CrImage::RGBAImage.from_png(file) }
File.open("other_image.png") { |file| image.to_png(file) }
Alternatively, you can use the convenience methods in the Open
and Save
modules
to acheive the same thing:
image = CrImage::RGBAImage.open("image.png")
image.save("other_image.png")
Direct including types
Defined in:
cr-image/format/png.crlib-formats/png.cr
Instance Method Summary
-
#to_png(io : IO) : Nil
Output the image as PNG to
io