Solved

Creating a ZIP File from List<Image> in silverlight

Posted on 2011-02-18
4
395 Views
Last Modified: 2012-05-11
In my SL4 app, I'm pulling in a zip file from the server, extracting the contents (Using SharpGIS), which are all image files, into a List<Image> and binding this to an image slideshow. This all works great.

I now need to do things the other way round. I have the code and UI in Place to add an image file to the List<Image>, I need to be able to then upload the changed image set back to the server, and replace the existing ZIP file with the new contents.

So, what is the best way to do this. I can see 3 options:

1) Handle the ZIP in SL (somehow) and upload the zip file to my WCF service to be saved
2) Upload the List<Image> to the WCF Service, extract each image, and create the ZIP file at the service
3) Convert the Images to Bytes and upload a file at a time to the WCF Service (Could be 50+ images)

Anyone get any ideas what is the best method?
0
Comment
Question by:wint100
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:John Claes
ID: 34925660
you want to Add an Image to the Zipfile?

then you should only send the image to the server, and do the adding overthere.
SharpGis will allow you over there to add the Image on a easy way.

regards
poor beggar
0
 
LVL 1

Author Comment

by:wint100
ID: 34925689
My main issue is how to get ALL of the Images from the List<Image>, to the server. Or shall I simply pass the List to the server, and handle everything there? Would this bloat the process at all, as a 1MB JPG could bloat up to 60+MB when loaded into memory.
0
 
LVL 10

Accepted Solution

by:
John Claes earned 500 total points
ID: 34927146
This is gone go wild !!

I would suggest sending Image by Image ....
So this way the server can add them directly when the user is adding them...
0
 
LVL 1

Author Comment

by:wint100
ID: 34937740
Hi,

I've now started to use the Upload control (which is free!) from www.vectorlight.net, this makes the whole upload process very easy.

I've also limited the number of files uploaded to those that have changed, or been added.

Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question