Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. How to save image in a folder in silver light

How to save image in a folder in silver light

Scheduled Pinned Locked Moved WPF
sysadmintutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nekkantidivya
    wrote on last edited by
    #1

    Hi, I am working on a silver light projrct.In this I need to upload an image and save it in a folder in the server(i.e., in a folder in the application). I want this funtion to be done on button click. So I cannot use file upload control. For getting the images I used open dialog. Now I have to sae the image. If anyone have any idea to save the image to folder please reply me. Thanks in advance.

    M J 2 Replies Last reply
    0
    • N Nekkantidivya

      Hi, I am working on a silver light projrct.In this I need to upload an image and save it in a folder in the server(i.e., in a folder in the application). I want this funtion to be done on button click. So I cannot use file upload control. For getting the images I used open dialog. Now I have to sae the image. If anyone have any idea to save the image to folder please reply me. Thanks in advance.

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      If you are selecting a file by using OpenFileDialog then you will get the stream, right? So, you can do http-post this stream to your web service. Please check this example: Silverlight File Upload[^] Note: It's not possible to do without using any web service.

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) Microsoft MVP (Silverlight), WPF/Silverlight Insiders

      1 Reply Last reply
      0
      • N Nekkantidivya

        Hi, I am working on a silver light projrct.In this I need to upload an image and save it in a folder in the server(i.e., in a folder in the application). I want this funtion to be done on button click. So I cannot use file upload control. For getting the images I used open dialog. Now I have to sae the image. If anyone have any idea to save the image to folder please reply me. Thanks in advance.

        J Offline
        J Offline
        Jeremy Likness
        wrote on last edited by
        #3

        You'll need to wire in a WCF service at the server side. The service would take the file information and byte array, then store it locally. In your Silverlight application, you'll reference the service, then take your image data and send it. To get to the image data, most likely you'll send it into a WriteableBitmap and then parse the Pixels array ... you can either format it on the Silverlight side and send it down, or send it raw and handle formatting on the server. Perhaps simple compression in the client, then uncompress and format into JPEG/PNG/etc on the server would be fine.

        Jeremy Likness Latest Article: Whats in Your Collection? Part 1 of 3: Interfaces Blog: C#er : IMage

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups