开发者

Scaling down image to a fixed dimension of 135x135

开发者 https://www.devze.com 2023-01-16 19:20 出处:网络
I h开发者_JAVA技巧ave to scale down image of any dimension to a fixed dimension of 135x135, most imp thing I have to maintain good quality of scaled down image. I\'m not much familiar with Image Proce

I h开发者_JAVA技巧ave to scale down image of any dimension to a fixed dimension of 135x135, most imp thing I have to maintain good quality of scaled down image. I'm not much familiar with Image Processing algos. Can you guys suggest me any algorithm.


Unless the input image is square, say 1000x1000, you will first have to crop it to a square aspect ratio (1:1) then scale it down to 135x135 pixels.


Firstly answer if you want to crop the image or deforming the image to fit in the box

Apply a 2d Sinc filter with the right size for the current scale factor. Scan the new image and pick up pixels from the old one by just dividing.

0

精彩评论

暂无评论...
验证码 换一张
取 消