I have source data streams from image files, for example:
vector<char> rawData(fileSize); ifstream inFile("image.jpg"); inFile.read(&rawData[0]);
I want to analyze the headers of different image formats in height and width. Is there a portable library that can read ints, longs, shorts, etc. From buffer / stream converting to endianess as indicated?
I would like to do something like: short x = rawData.readLeShort(offset); or long y = rawData.readBeLong(offset)
An even better option would be a lightweight and portable image metadata library (without the extra weight of an image manipulation library) that can handle raw images. I found that Exif libraries there do not support png and gif .
c ++ image endianness filestream metadata
Kache
source share