Resize/crop/pad a picture to a fixed size

前端 未结 11 1772
孤城傲影
孤城傲影 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:52

    You'll have to crop 5 px off the top and bottom to get to your target size, however this could ruin the picture.

    Really you should have a target width or height, then adjust the other dimension by the same proportion.

提交回复
热议问题