如何自动生成图片缩略图?详细要求见内

Figgo 2003-02-25 09:45:14
这是主管给我的要求
For every JPEG, GIF or BMP image file of W*H pixels uploaded to our server, create a corresponding JPEG thumbnail image file of w*h pixels that satisfies the following conditions:
1.1. Aspect ratio must be maintained, i.e. w/h = W/H.
1.2. Longest side has 108 pixels, i.e. w=108 or h=108.
1.3. If both W and H are less than 108, do not enlarge the image. Set w=W and h=H.
1.4. JPEG compression parameters should be, in Photoshop “Save for Web” terms:
1.4.1. bicubic resampling
1.4.2. 40% quality
1.4.3. non-progressive
1.4.4. optimized
1.5. The image file size should be less than 4 KB to conserve storage.
...全文
59 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
colors 2003-02-25
  • 打赏
  • 举报
回复
up
laoer 2003-02-25
  • 打赏
  • 举报
回复
Java Advanced Imaging 应该可以解决这个问题!
http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/
Figgo 2003-02-25
  • 打赏
  • 举报
回复
大家帮帮忙吧
主要是解决1.2和1.3两点就行了
brandyChen 2003-02-25
  • 打赏
  • 举报
回复
用Jimi直接压缩图像。
http://java.sun.com/products/jimi/

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧