module

Vug::ImageDimensions

Extracts image dimensions from raw bytes for various image formats. Supports PNG, JPEG, WebP, ICO, GIF, and falls back to CrImage for others.

Class methods

get(data : Bytes) : Tuple(Int32, Int32) | Nil

Get image dimensions from raw bytes. Returns {width, height} or nil if dimensions cannot be determined.

Source