Take a look at my project,

. It has everything you need for working with the packet as well as the image itself. It's written in C#, but if you know C++, it won't be too hard to follow, as the original project was C++ but ported to C# since it's easier to show the concepts with. You will also need my C#

.