Link to home
Start Free TrialLog in
Avatar of wint100
wint100Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Creating a ZIP File from List<Image> in silverlight

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?
Avatar of John Claes
John Claes
Flag of Belgium image

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
Avatar of wint100

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of John Claes
John Claes
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wint100

ASKER

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