module Pluto
Overview
This project was initially a fork of Pluto, and so can very easily convert
between the underlying format used by CrImage and Pluto. To easily convert a Pluto image to CrImage, simply:
require "cr-image/pluto"
image # => Pluto::ImageRGBA
image.to_crimage # => CrImage::RGBAImage
image.to_crimage.to_pluto # => Pluto::ImageRGBA
This also works with Pluto::ImageGA and CrImage::GrayscaleImage, respectively.
Why are
ImageRGBAandRGBAImagenames mirrored?
The current CrImage names are a carry over from when originally forked from Pluto. However, after Pluto renamed RGBAImage to ImageRGBA, I noticed it became
more difficult to visually distinguish between ImageRGBA and ImageGA, as opposed to RGBAImage and GrayscaleImage, so I kept the older names.
Defined in:
lib/pluto/src/pluto.crlib/pluto/src/pluto/channel_type.cr
pluto.cr