-1

Which one is the best way to save thousands of image from my windows form application?

By doing some head storming search what I got is, sql server is not a good option to save that huge amount of data, local disk is a better option. But here I become more confused. because, there might be situation that the folder can be removed or replaced. If so, my app will lost the path and those images. So here I got stuck.

Is resx files (resource files) can be a option?

Please suggest me a good way for that problem. If this question asked before, please provide a link, that might be more helpful?

I have never used images in C# before, so I have no idea on how to actually do it. So I would really appreciate if someone could link me to a tutorial or something.

I am using visual studio 2013 and MQ SQL Server 2012

There's a question similar to my question. but I found mine different.

How to save/retrieve images from disk in windows form application?

Community
  • 1
  • 1
Onick Ahmed
  • 91
  • 1
  • 15
  • 1
    Are these pictures *static* within the application or can the user add, remove, replace images? – Oliver Jan 16 '17 at 12:53
  • @Oliver user will add them, if user don't, there will be default image provided. I am actually working on a student management software. there I need to store student images. – Onick Ahmed Jan 16 '17 at 12:58
  • "because, there might be situation that the folder can be removed or replaced." Is this really such a high risk, that you should concern yourself with it? To me, the folder can be hidden out of sight of user, so it cannot be so easily removed. Also, the same can be done with database files, so you don't solve anything using a database. – Euphoric Jan 16 '17 at 13:01

1 Answers1

-1

If your managing of images is dynamic, it is my recomendation to use an non relational database to save images, such as MongoDB. You will find it very fast and easy to use. You can use GridFS, which is for storing and retrieving files that exceed the limit of 16 MB. Here is SO post where it is explained how to do the work you need:

https://stackoverflow.com/a/4990536/637840

Community
  • 1
  • 1
NicoRiff
  • 4,803
  • 3
  • 25
  • 54