struct

CrImage::Config

Inherits Struct / Value / Object

Config holds an image's color model and dimensions.

Used by read_config methods to get image metadata without decoding the entire image, which is faster and uses less memory.

Example:

config = CrImage.read_config("large_image.png")
puts "#{config.width}x#{config.height}"
puts config.color_model.name

Constructors

new(color_model : CrImage::Color::Model, width : Int32, height : Int32)
Source

Instance methods

color_model
Source
color_model=(color_model : Color::Model)
Source
height
Source
height=(height : Int32)
Source
width
Source
width=(width : Int32)
Source