module Athena::ImageSize

Overview

The Athena::ImageSize component, AIS for short, allows creating an AIS::Image from various [image formats][Athena::ImageSize::Image::Format]. The component has no dependencies and is framework agnostic.

The image can be provided as a file path, or an IO, such as the response to an HTTP request. The image is processed byte by byte, so large images can be handled without loading the full image into memory.

WARNING This component is NOT intended to check if a file is a valid image and may return nonsensical values if given a non-image file.

Defined in:

athena-image_size.cr
image_format.cr

Constant Summary

VERSION = "0.1.0"

Class Method Summary

Class Method Detail

def self.dpi : Float64 #

Represents the DPI (Dots Per Inch) used to calculate dimensions of AIS::Image::Format::SVG images, defaulting to 72.0.


[View source]
def self.dpi=(dpi : Float64) #

Represents the DPI (Dots Per Inch) used to calculate dimensions of AIS::Image::Format::SVG images, defaulting to 72.0.


[View source]