-
Output of image files
Hello hello :) I'm totally jammed with images, mainly jpeg/jpg and I hope you understand what I try to explain now ;)
I've been trying to read a should-be-simple jpg of pixel size of 1x1 and same sized 16-colored bmp image. I made that pixel white (255, 255, 255) but can't read nor output it (I use dos).
I just get weird values with fread().
It seems, size 1x1 makes the file size 122 and 2x2 655 bytes if that has something to do with it?
Shortly said :) I want to read header and pixels of the file and output the pixels with right colors on dos screen.
-
Have you looked over the file format specifications for these file types so you know where abouts in the file the pixel data is?
-
No JPEG has to do with the amount of similar color 'areas' there are in the image. Go to www.wotsit.org to look up the JPG format. It's rather complex.
-
ok, gotta learn then, thanks to both