Resize/crop/pad a picture to a fixed size

前端 未结 11 1797
孤城傲影
孤城傲影 2020-11-27 14:58

I need to resize a picture to a fixed size. But it has to keep the factors between the width and height.

Say I want to resize a picture from 238 (w) X 182 (

11条回答
  •  囚心锁ツ
    2020-11-27 15:30

    I'd much rather resize so that the image is contained within your limit and then fill out the blank parts. So in the above example you would resize so that the height is OK, then fill up (7 pixels on each end I think) to the left and right with a background color.

提交回复
热议问题