08-21-2005, 09:18 PM
Hello,
I want to write a program that would extract image width and height in pixels from a JPEG file, but I don't know where in the JPEG header is this information. Well, it seems to me that bytes 15-16 store the width, and 17-18 store the height, but even if that is true, I don't know how to convert those bytes to the number of pixels. I'd appreciate if someone explained where to find that data and how to traslate it in pixels.
I want to write a program that would extract image width and height in pixels from a JPEG file, but I don't know where in the JPEG header is this information. Well, it seems to me that bytes 15-16 store the width, and 17-18 store the height, but even if that is true, I don't know how to convert those bytes to the number of pixels. I'd appreciate if someone explained where to find that data and how to traslate it in pixels.