class Greitspitz::Transformer

Overview

Applies a list of operations to transform a source image. Allows a format parameter to force an output format other than JPEG.

Defined in:

greitspitz/transformer.cr

Constant Summary

FORMATS = {"avif" => ".avif", "jpeg" => ".jpg", "png" => ".png"}

We only support a subset of available formats in VIPS to reduce the attack surface on the server and only serve image formats that make sense in the browser.

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(input : IO, instructions : Instructions) #

[View source]

Class Method Detail

def self.parse_dimensions(value) #

[View source]

Instance Method Detail

def format : String #

[View source]
def quality : Int32 #

[View source]
def write(output : IO) #

[View source]