class

Hwaro::Content::Seo::Pwa

Inherits Reference / Object

Constants

PNG_SIGNATURE = Bytes[137, 80, 78, 71, 13, 10, 26, 10]

Read width/height from a PNG's IHDR chunk. Verifies the 8-byte PNG signature, then reads two big-endian UInt32s at offsets 16 (width) and 20 (height). Returns nil when the file is missing, too short, or not a PNG so the caller can fall back to the filename heuristic.

Class methods

generate(site : Models::Site, output_dir : String, verbose : Bool = false)
Source