module

CrImage::Operation::BilinearResize

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

Instance methods

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

Resizes image to new dimensions

Source
bilinear_resize!(width : Int32, height : Int32) : self

Resizes image to new dimensions. Modifies self.

Source