I am developing a Windows 8.1 silverlight app . For my application I have to take screenshot of present screen and send the screenshot to server . For this I converted the image to byte array. The problem is the converted byte array containing bytes from 0 to 255 but i want -127 to 127 . How to do this.
sample of byte array I am getting is
255,216,255,224,0,16,74,70,73,70,0,1,1,1,0,96,0,96,0,0,255,219,0,67,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,255,219,0,67,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,255,192
required format is
-119,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,3,18,0,0,1,19,8,6,0,0,0,-94,7,48,71,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,-120,0,0,32,0,73,68,65,84,120,-100,-20,-35,-55,-113,-100,121,-98,-33,-9,-9,-77,-58,-66,-28,-66,49,51,-103,-36,-117,-59,98,85,-85,87,77,25,-93,-42,-76,0,73,-10,-95,-95,-117,5,75,23,-51,-63,103,-63,-14,-67,-83,-77,1,13,12,-1,3,-126,14,51,48,96,-7,96,-40,24,75,-16,-12,-72,87,77,87,-41,-50,-30,82,44,46,73,-26,-58,92,35,99,-113,120,-30,-39,124,72,38,-101,85,77,22,-103
ScreenShot taking and Converting to bytes code
WriteableBitmap bmp = new WriteableBitmap(480, 696);
bmp.Render(LayoutRoot, null);
bmp.Invalidate();
var ms = new MemoryStream();
bmp.SaveJpeg(ms, 480, 696, 0, 100);
ms.Seek(0, SeekOrigin.Begin);
imagebytes = ms.ToArray();
thank you,