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条)

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP