Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send big image from wp7 to wcf?

I'm trying to send an image to wcf to use OCR. For now, I succeeded in transforming my image into a byte[] and sending it to the server using wcf. Unfortunately, it works for an array whose size is <16Kb and doesn't work for an array >17Kb.

I've already set the readerQuotas and maxArrayLength to its maximum size in web.config on the server size.

Do you know how to send big data to a wcf server, or maybe any library to use OCR directly on wp7?

like image 576
Bidi Avatar asked Feb 24 '11 07:02

Bidi


2 Answers

If all else fails, send it in fragments of 16Kb, followed by an "all done" message that commits it (reassembling if necessary)

like image 176
Marc Gravell Avatar answered Sep 28 '22 10:09

Marc Gravell


Bit of a hack but howabout sending it with a HTTP post if it isn't too big? or alternatively changing the webservice so it accepts a blob? (the current array limitation is a limit on the array datatype in the W3C spec)

like image 36
Leon Krancher Avatar answered Sep 28 '22 10:09

Leon Krancher