transferring images from server to winforms application - smallest possible size
-
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
-
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
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.
-
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
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)) -
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))Good point - I didn't think of that.
Christian Graus Driven to the arms of OSX by Vista.
-
Good point - I didn't think of that.
Christian Graus Driven to the arms of OSX by Vista.
But Triple the size? Base64 should be 1/3rd larger, right? :)
Mark Salsbery Microsoft MVP - Visual C++ :java: