module CrImage::Operation::BilinearResize

Overview

Resize an image using a bilinear resizing algorithm.

Taking sample image:

Woman with black turtleneck and white background
puts image.width, image.height # => 159x199
image.bilinear_resize(40, 50).save("small_sample.jpg")
image.bilinear_resize(200, 250).save("larger_sample.jpg")
Sample image reduced to 20% size Sample image increased by 25% size

Direct including types

Defined in:

cr-image/operation/bilinear_resize.cr

Instance Method Summary

Instance Method Detail

def bilinear_resize(width : Int32, height : Int32) : self #

Resizes image to new dimensions


[View source]
def bilinear_resize!(width : Int32, height : Int32) : self #

Resizes image to new dimensions. Modifies self.


[View source]