i just retried a 256 byte chunk from inet, i need to parse it

ive been workingon it for an hour, and no luck, so im turning here. heres the format:

1-4 Sequence header In Hex 000001B3
code
12 bits Horizontal size In pixels
12 bits Vertical size In pixels

i need the horzontal and vertical size

<-- confused

thanks