Link to home
Start Free TrialLog in
Avatar of eladr
eladr

asked on

byte array from image source

Hi..

When executing this code in debig mode, im looking on the byte array:
byte[] inputBuffer = File.ReadAllBytes("c:\\env\\bla.jpg");

[0] 255
[1] 216
[2] 255
[3] 224
[4] 0
&
&
&
In ASCII stream is obvious: each byte represent character, but what happened with image? It should contain binary data. No?
10x
ASKER CERTIFIED SOLUTION
Avatar of imladris
imladris
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
imladris is right in general, but if you know that "bls.jpg" is indeed a JPEG file, then the bytes should be interpreted as JPEG; you can find a copy of the file spec at http://www.digicamsoft.com/itu/itu-t81-1.html.

Note that JPEG is a very complex format; if you are trying to do image manipulation on a JPEG file you would be much be much better off rendering it to a graphics buffer and doing your manipulation on the buffer.