While it is possible using
for such a purpose, why don't you use a more recent compiler?
Visual C++ Express Edition
is available for free, for instance.
As about the programming question: once you know the format of the image file, it shouldn't be a daunting task writing a function to extract the required info.