Reputation: 7334
I have an image captured every second from my web cam of size 720x576.
I ultimately display this in a canvas control via my server.
I convert this jpeg to bytes (31553) and upload it using WCF.
I have been debating whether to split this image into 4 smaller images and uploading them 1 after the other. When each image is uploaded it is drawn on a hidden canvas. Then once all 4 images are uploaded I update the visible canvas with the 'cached' canvas.
Will this be a better/faster way to upload the image by splitting into 4 images or will it make no difference at all?
I will write and conduct tests for this code now but thought I would set myself up to be educated as to what the done/accepted wisdom is.
Thanks
Upvotes: 0
Views: 79
Reputation: 2179
If you look from compression point of view, the total size of the four images should be more than one image. You can imagine as compressing redundant information 4 times. If you keep on dividing and compressing, you may end up sending every pixel.
Another way to look at this is from network's point of view. Many times internet bandwidth is the limiting factor, so probably sending one file would be best (as it would be smaller). In another scenario, there might be congestion in the network so multiple data streams (if you upload them in parallel and the server is multi-threaded) are more likely to get a larger chunk of the bandwidth.
Upvotes: 1