class Tremolite::ImageResizer

Defined in:

tremolite/image_resizer.cr

Constant Summary

Log = ::Log.for(self)
PROCESSED_IMAGES_PATH = File.join(["images", "processed"])
PROCESSED_IMAGES_PATH_FOR_WEB = File.join(["/", "images", "processed"])

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(blog : Tremolite::Blog) #

[View source]

Class Method Detail

def self.copy_image(source : String, output : String) #

[View source]
def self.download_image(source : String, output : String) #

deprecated


[View source]
def self.processed_path_for_post(processed_path : String, post_year : Int32, post_month : Int32, post_slug : String, prefix : String, file_name : String) : String #

Use this method for all processed images paths


[View source]

Instance Method Detail

def resize_all_images_for_post(post : Tremolite::Post, overwrite : Bool) #

[View source]
def resize_for_post(post : Tremolite::Post, overwrite : Bool, name = "header.jpg") #

[View source]
def resize_image(path : String, width : Int32, height : Int32, output : String, overwrite : Bool, quality = 70) #

[View source]