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. C#
  4. transferring images from server to winforms application - smallest possible size

transferring images from server to winforms application - smallest possible size

Scheduled Pinned Locked Moved C#
csharpwinformswcfsysadminarchitecture
5 Posts 4 Posters 1 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.
  • H Offline
    H Offline
    harleydk
    wrote on last edited by
    #1

    Hello all, happy holidays, when you get thus far. I'd much appreciate your thoughts on this issue: I need to transfer a bunch of images from a server to a winforms application. Approximiately 30-40 group4fax tiff's at an unknown size. I haven't as yet decided on the architecture. I thought I'd go with a WCF service and transfer the images as byte arrays, pre-loaded to server-memory. Would this procedure seem recommended for this task? The aim, naturally, is to transfer the least amount of bytes to the client, to allow for the best response-time. I've noticed when I convert the images to byte arrays, these arrays triple in size, so I guess that's not the best way to go 'round the issue of limiting the client's download time. All your thoughts are surely appreciated, thanks in advance, Morten

    C L 2 Replies Last reply
    0
    • H harleydk

      Hello all, happy holidays, when you get thus far. I'd much appreciate your thoughts on this issue: I need to transfer a bunch of images from a server to a winforms application. Approximiately 30-40 group4fax tiff's at an unknown size. I haven't as yet decided on the architecture. I thought I'd go with a WCF service and transfer the images as byte arrays, pre-loaded to server-memory. Would this procedure seem recommended for this task? The aim, naturally, is to transfer the least amount of bytes to the client, to allow for the best response-time. I've noticed when I convert the images to byte arrays, these arrays triple in size, so I guess that's not the best way to go 'round the issue of limiting the client's download time. All your thoughts are surely appreciated, thanks in advance, Morten

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If you just send the bytes of the image, there's no way they can 'triple in size'. If you were to turn them into a bitmap and send that data, they will get a lot bigger. Send the tiff data directly, and then stuff that into a stream and read it into a bitmap from there on the other end. The compression you will find in formats like tiff/jpeg/png are as good as you'll get. Perhaps converting to jpg will make them smaller, it's worth a try.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      • H harleydk

        Hello all, happy holidays, when you get thus far. I'd much appreciate your thoughts on this issue: I need to transfer a bunch of images from a server to a winforms application. Approximiately 30-40 group4fax tiff's at an unknown size. I haven't as yet decided on the architecture. I thought I'd go with a WCF service and transfer the images as byte arrays, pre-loaded to server-memory. Would this procedure seem recommended for this task? The aim, naturally, is to transfer the least amount of bytes to the client, to allow for the best response-time. I've noticed when I convert the images to byte arrays, these arrays triple in size, so I guess that's not the best way to go 'round the issue of limiting the client's download time. All your thoughts are surely appreciated, thanks in advance, Morten

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        harleydk wrote:

        I've noticed when I convert the images to byte arrays, these arrays triple in size

        I assume you mean when byte arrays are encoded in Base64 which I assume is needed for WCF byte[] transfers. Then it is normal.

        xacc.ide - now with TabsToSpaces support
        IronScheme - 1.0 beta 1 - out now!
        ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

        C 1 Reply Last reply
        0
        • L leppie

          harleydk wrote:

          I've noticed when I convert the images to byte arrays, these arrays triple in size

          I assume you mean when byte arrays are encoded in Base64 which I assume is needed for WCF byte[] transfers. Then it is normal.

          xacc.ide - now with TabsToSpaces support
          IronScheme - 1.0 beta 1 - out now!
          ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Good point - I didn't think of that.

          Christian Graus Driven to the arms of OSX by Vista.

          M 1 Reply Last reply
          0
          • C Christian Graus

            Good point - I didn't think of that.

            Christian Graus Driven to the arms of OSX by Vista.

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            But Triple the size? Base64 should be 1/3rd larger, right? :)

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            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