class DFL::PalGraphic
- DFL::PalGraphic
- Reference
- Object
Overview
A DFL::Head
's palgraphic data
Included Modules
Defined in:
D_File/dfl/palgraphic.crwrite.cr
Constructors
-
.from_graphic(graphic : Graphic, palette : Palette) : PalGraphic
Converts a graphic to a palgraphic
-
.from_image(image : Raylib::Image, palette : Palette) : PalGraphic
Converts a
Raylib::Image
to a palgraphic -
.read(io : IO) : PalGraphic
Reads in a dfl palgraphic given the io
Class Method Summary
-
.color_distance(color1 : Color, color2 : Color) : Int
Gets the absolute Color Distance between color1 to color2
Instance Method Summary
-
#data : Array(UInt64 | UInt32 | UInt16 | UInt8 | Nil)
The image data
-
#data=(data : Array(UInt64 | UInt32 | UInt16 | UInt8 | Nil))
The image data
-
#height : UInt32
The height of the image
-
#height=(height : UInt32)
The height of the image
-
#to_graphic(palette : Palette) : Graphic
Converts a palgraphic to a graphic
-
#to_image(palette : Palette) : Raylib::Image
Converts a palgraphic to a Raylib::Image
-
#width : UInt32
The width of the image
-
#width=(width : UInt32)
The width of the image
Instance methods inherited from module WritingMethods::DFL::PalGraphic
write(io : IO)
write
Constructor Detail
Converts a graphic to a palgraphic
NOTE If you get an arithmetic overflow error at any point, chances are that your image is too big
Converts a Raylib::Image
to a palgraphic
NOTE If you get an arithmetic overflow error at any point, chances are that your image is too big
Class Method Detail
Gets the absolute Color Distance between color1 to color2
Instance Method Detail
Converts a palgraphic to a Raylib::Image