存储图像的最佳方式 [英] best way to store Image

查看:70
本文介绍了存储图像的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的担心存储图像,因为如果我将它存储在数据库中它可能会影响并使我的系统变慢但是如果我将它存储在机器文件夹中。它不能跨网络使用。我真的很头晕这个问题。谁能告诉我最好存储图像?



很快就会在这里等你....



感谢高级。

解决方案

对于Window应用程序..< br /> 
1>此图像是否更改经常?然后转到基于目录的approcach,将其存储在目录中并加载它。也许你可以拥有一个xml来加载这些文件的名称。因此,在文件(图像)中更改名称,只需更改xml。< br />
< br />
2>这些文件永远不会更改?然后只是将它们嵌入到资源中,这样就可以嵌入你的exe / dll中,没有一个可以破坏图像。< br />





用于Web Applucation。

设置参考号。



http://stackoverflow.com/questions/4535627/where-is-the-best-place-to -save-images-from-users-upload [ ^ ]

http://www.dofactory.com/topic/1379/best-practice-store-images-in-db-or- on-file-system.aspx [ ^ ]

http://stackoverflow.com/questions/1078535/how-do-you-store-images-for-asp-net-应用程序 [ ^ ]


I really worry about storing Image because it could be affect and make my system slow if I store it in database but if I store it in machine folder.It can not use across network.I'm really dizzy about this problem.could anyone tell me about the best for storing image?

waiting to here from you soon....

thank in advanced.

解决方案

For Window application..<br />
1>Does this images change often? Then go for directory based approcach, where store it in a directory and load it up. May be you can have an xml having the names of these files to load. So name change in the files (images), just change xml.<br />
<br />
2>These files never changes? Then just embed those as a resources, such a way it will be embedded into your exe/dll and none can corrupt the images.<br />



For Web Applucation.
set the ref.

http://stackoverflow.com/questions/4535627/where-is-the-best-place-to-save-images-from-users-upload[^]
http://www.dofactory.com/topic/1379/best-practice-store-images-in-db-or-on-file-system.aspx[^]
http://stackoverflow.com/questions/1078535/how-do-you-store-images-for-asp-net-application[^]


这篇关于存储图像的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆