阅读背景:

Ruby on Rails中的基本图像大小调整

来源:互联网 

I'm creating a little photo sharing site for our home's intranet, and I have an upload feature, which uploads the photo at original size into the database. However, I also want to save the photo in four other sizes: W=1024, W=512, W=256 and W=128, but only the sizes smaller than the original size (e.g. if the original width is 511, only generate 256 and 128). The image with a width of 128 should always be generated (because it's a thumbnail). Also, the resization should always be with a proportional width and height. How can I implement this? I already have this code to upload the photo:I'm creating a little photo sharing site for ou




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: