开发者

How does facebook handle resizing of images

开发者 https://www.devze.com 2023-01-15 19:50 出处:网络
Hello I am building a social network similar to facebook and I really need some help on how to handle the images in my website.I would like to know how sites like facebook manage the resizing of their

Hello I am building a social network similar to facebook and I really need some help on how to handle the images in my website. I would like to know how sites like facebook manage the resizing of their images. An example would be looking at someones photo album. The length and width are not just simply changed. They are done in a more professional way to make the image still lo开发者_JAVA百科ok clear and not stretched. Do they use a special tool for this. Another example would be profile pics when they are loaded to your message wall. Your friends profile pics are centered and cropped accordingly and then re sized. How do they go about doing this. Any help would be greatly appreciated.


They resize proportionally with an imaging library like GD, Imagick or others.

The presentation in the gray area is just that, presentation so HTML and CSS.


They stretch the images proportionally so that they don't look wrong; if you make the image 37.5% wider... you also make it 37.5% taller.

If we knew what language you are familiar with, we could probably suggest something to help with this.

0

精彩评论

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

关注公众号