Reprocessing images of different versions in Carrierwave

前端 未结 5 1374
甜味超标
甜味超标 2021-02-02 14:12

Using Carrierwave, I created 3 versions of an avatar - an original, a small_thumb and a large_thumb using the following lines:

process :resize_to_limit => [40         


        
5条回答
  •  心在旅途
    2021-02-02 15:02

    check this latest RailsCast:

    http://railscasts.com/episodes/182-cropping-images-revised

    after cropping one version of the image, you can then either calculate the cropping coordinates for the other versions, or probably easier, scale down the cropped image with the same aspect ratios as the other versions of the original image

提交回复
热议问题