|
-
Jun 22nd, 2009, 08:37 AM
#1
Thread Starter
Addicted Member
[RESOLVED] How to database images and access them?
I have a project where the application needs to display certain images based on different user inputs and selections. There are hundreds of pictures and it's OK for them to be statically linked, however the application will need to be distributed eventually, probably by CD.
I could just make one big directory for all of the images, and hard link them all, and that would get the job done, but I was wondering if it would be any better to create a database of images (or something else even)? I've never worked with databases at all, so I don't know what the advantage of doing this might be, and how I would go about creating the database in the first place? One advantage I was thinking of was a cleaner install/file structure, rather than having the user be able to access each image file on the CD, really only the application could access them, and it's just the 2 files necessary to run the application, the executable and the database.
So, is there any benefit to using a database for the images, or should I just statically link them? If there is a benefit to using a database, can anyone point me in the right direction as far as how to create the database?
Last edited by pjrage; Jun 22nd, 2009 at 02:03 PM.
Reason: Resolved
-
Jun 22nd, 2009, 08:42 AM
#2
Re: How to database images and access them?
 Originally Posted by pjrage
however the application will need to be distributed eventually, probably by CD.
Distributed to whom?
Will this be a strickly in-house, corporate, application or do you intend to market this commerically?
-
Jun 22nd, 2009, 08:55 AM
#3
Re: How to database images and access them?
You should look at creating a satellite assembly, which is a DLL containing nothing but resources. That way your images are all binary and not easily accessible or editable by the user but they are separate from your core application.
-
Jun 22nd, 2009, 09:13 AM
#4
Re: How to database images and access them?
jmc's suggestion is probably the best way to go. there's no need for a database in this case, and would end up creating more of a hassle than anything else. if you add the images to an assembly as resources, then expose them as shared public read only properties, not only is that easy to deal with, but updates to the images (or adding/removing ones) becomes a lot easier as well.
-tg
-
Jun 22nd, 2009, 02:02 PM
#5
Thread Starter
Addicted Member
Re: How to database images and access them?
Thanks for the ideas guys! I'm looking into satellite assemblies now and it seems like just what I need.
This project won't ever be commercial or anything like that. More like a widespread internal distribution.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|