module CrImage::Format::JPEG
Overview
Provides methods to read from and write to jpeg. Requires libturbojpeg
to function.
image = File.open("image.jpg") { |file| CrImage::RGBAImage.from_jpeg(file) }
File.open("other_image.jpg") { |file| image.to_jpeg(file) }
Alternatively, you can use the convenience methods in the Open
and Save
modules
to acheive the same thing:
image = CrImage::RGBAImage.open("image.jpg")
image.save("other_image.jpg")
Direct including types
Defined in:
lib-formats/jpeg.crInstance Method Summary
-
#to_jpeg(io : IO, quality : Int32 = 100) : Nil
Output the image as JPEG to
io