Solved

Creating a ZIP File from List<Image> in silverlight

Posted on 2011-02-18
4
393 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
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 …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now