I am writing application using c++, in windows.
I want to get a thumbnail from jpeg, without decoding the whole image. How Can I read thumbnail from jpeg exif header? Can any one offer me a some sample code?
Many thanks!
I am writing application using c++, in windows.
I want to get a thumbnail from jpeg, without decoding the whole image. How Can I read thumbnail from jpeg exif header? Can any one offer me a some sample code?
Many thanks!
Don't bother. You can create tumbnails very fast from JPEGs. They are compressed using DCTs on 8x8 pixel blocks. So, get the DC component (i.e. 0,0) of each block and you have an 1/64th thumbnail without decoding. Further scaling should be fast since there are hardly any pixels left.
Unsurprisingly the library is called libexif has win32 port, and there is sample code for reading thubnail from file