Does sending and image as a byte[] download faster than sending it as a BitmapImage? Assume I'm only downloading开发者_高级运维 one image to a client application. Is this helpful or do I need to compress the image in order for it to download faster?
EDIT: I'm using downloading an image file through a WCF service.
Whether you send it as a byte
or as a BitmapImage
, the number of bytes sent will be the same. Or at least so close to the same as not to make a difference. The only way you're going to increase the speed is by reducing the number of bytes sent, typically by compressing the image.
What kind of transport are you using? That's important. Generally though, when moving something over the wire it must be serialized, usually to a byte array. So you might save yourself the added step of serializing the BitmapImage instance, but transmission speed will remain the same.
精彩评论