Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
JPEG header: width and height in pixels
#1
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.
Reply
#2
Hello, first i'll ask: what language are you using, qb or fb?
Reply
#3
I'm using qbasic. At the moment, I'm not asking for code that will do this, I kinda want to write it myself, just I can't start until I get acquainted with the JPEG header. But if I'm not able to get it to work, I'll ask for further help :)
Reply
#4
you could try http://www.wotsit.org
Reply
#5
Looking at a few other places didn't help me, but now I've got it, thanks. Now I can study how to open files in binary mode and write down those few lines of code :)
Reply
#6
if you run into any problems, feel free to post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)