Create a Library of Images??

S

SteveV

I'm working on an application that uses a a collection of images
licensed from a third party. Part of the license agreement includes a
stipulation that the images must be embedded in a manner that prevents
the end-user from creating copies of the images.

In other words; I can't store the bitmaps in their native format on
the end user's device where they would be able to copy all of the
images and use them for some other purpose.

The number of images is quite large (over 4000 images) and consists of
images grouped by category. While our application only uses a small
number of the images at any given time we need the ability access to
any of the images in the collection.

I've put together several C# Class Libraries with images grouped by
categories and saved as embedded resources. The libraries include
helper functions to allow images to be easily loaded from the dll. If
I continue down this road, I'll have over 30 libraries with up to
several hundred images in each lib. Now, what happens to memory usage
when I'm only using a couple of images from each lib? Is the entire
lib loaded in memory or only the images being used? Is this a valid
approach to be taking or are there better alternatives?

Of the many things I can't get my head around with this approach are:

a.) how would I go about creating an image browser that would allow
the user to preview the images in the library.

b.) allow the user to do a text search for an image using the image
resource name

Surprisingly, the company we are licensing the images from does not
have any kind of SDK. And the image set they provide is so
specialized that I have no viable alternative source.

Thoughts, suggestions, comments would be greatly appreciated.

Thanks -- Steve
 
C

Chris Tacke, eMVP

First, compiling them as an embedded resouce doesn't hide them at all. It's
really easy to extract images from DLLs and there are several free tools to
do so.

Second, you're going to hit memory limitations in CE quickly. The CF will
likely load the entire library when you want a single image.

I think your best bet is to save each as a BLOB in a single SQL CE file.
You could add metadata that way too. You could then have encryption,
password protection, indexed searches, metadata searches, low memory usage,
and a single file to deploy.

-Chris
 
S

SteveV

I was thinking about this as a possible solution but was concerned
about the speed retrieving images. Any feel for what kind of speed I
can expect as compared to loading a bitmap from a file?

Regards -- Steve
 
S

SteveV

I neglected to mention that part of the project includes a companion
desktop app that needs to access the image library as well. How would
I do this if I go the SQL CE route?

Thanks -- Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top