duandian2725 2012-06-26 01:07
浏览 78
已采纳

我应该将上传的照片转换成一种格式还是保留原始格式

I'm writing a simple image upload function with php + image magick using amazon ec2 + s3.

The function basically receives the image, possibly compresses, and resizes it into 3~4 different sizes and the images get accessed more frequently than they are uploaded.

Not being an expert on digital images, I'm still deciding on whether to convert uploaded images into jpeg or keep their original format (jpeg, png, gif - gif will be converted into a still image in case the format gets converted).

There are two things to take into consideration that I can think of.

  1. computing power usage (better not to convert)
  2. network bandwidth (better to convert)

any recommendation?

  • 写回答

3条回答 默认 最新

  • dtja73027 2012-06-26 01:11
    关注

    From my experience, you want to keep the original image. You might need it later if you decide to redesign site and change image formats globally. If you don't keep the original, you will not be able to re-process them in such situation.

    Re. computing power usage -- you should not worry about that. You resize only once, and then optimized image size compensate on CPU and bandwidth later every time images are loaded.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分