struct

DataDungeon::Measurement

Inherits Struct < Value < Object

What DataDungeon reads from a picture's bytes: its size; whether any pixel is transparent; the colour most of the visible picture is (0xRRGGBB); the box around the visible pixels ({x, y, w, h}); and, for an animation, its frames. Fields a format doesn't give are nil: a JPEG or GIF gives its size (and a GIF its frames) from its header, and the rest needs its pixels decoded.

Constructors

new(width : Int32, height : Int32, transparent : Bool | Nil = nil, dominant_color : Int32 | Nil = nil, content : Tuple(Int32, Int32, Int32, Int32) | Nil = nil, animation : ImageAnimation | Nil = nil)
Source

Instance methods

animation
clone
Source
content
copy_with(width _width = @width, height _height = @height, transparent _transparent = @transparent, dominant_color _dominant_color = @dominant_color, content _content = @content, animation _animation = @animation)
Source
dominant_color
height
transparent
width