you can use Windows GDI and GDI+ functions to get bytes from every pixel of a JPEG image.
1.create a bitmap by loading your jpeg image.
2.retrieve bits using getbitmapbits() or getDIBits() windows GDI functions
Link Windows GDI:
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)