Hi All,
I just wanted to know how do we find out whether the given JPEG image file is an EXIF complaint or not.
I just have the filename of the jpeg image.
Thanks,
-devaraj
Hi All,
I just wanted to know how do we find out whether the given JPEG image file is an EXIF complaint or not.
I just have the filename of the jpeg image.
Thanks,
-devaraj
You obviously can't tell whether a JPEG file has EXIF metadata in it or not, by just looking at the file name. If you read the file however and use the EXIF API then phe problem is quite trivial. See http://wiki.forum.nokia.com/index.ph...Using_Exif_API
-- Lucian
Hi ltomuta, thanks for the reply. i understood how to open the the JPEG file using the CExifRead class functions. through this method we can find out whether the image is EXIF or not. Actually i was looking for any way or functions that can be directly used to find out the JPEG image is EXIF complaint without actually opening the image data in a buffer or is there anyway where we can just open the EXIF header of the image?
Thanks,
-Devaraj
in standard, the EXIF is stored in the jpeg file. So what I can understand is, you must read this part of jpeg data for checking out the EXIT.
Otherwise, for a file, without opening and reading, you can check the file name, and file attributes.
Regards
Pai
Symbian && Android && iPhoneOS
Hi,
Have you experimented with reading in less than the whole file and trying to pass just the header into the API?
Certainly it shouldn't be necessary to read the whole file in theory, in practice it may be different - just try it.
Obviously you can't tell without opening the file at all, as the others have said. You could try making a guess that the Exif header is always less than 100kB say (although with a thumbnail it might be bigger I guess). Otherwise you'd need to figure out what size the header is, for that you'd need to parse the format yourself, and having done that you'll already know whether there is an Exif header or not... so no need to use the API.
Mark
My understanding is that EXIF is a container for the main image as well as the thumbnail[optional]. It is not the other way around i.e. exif is not stored in the JPEG image instead JPEG image is stored in the EXIF container. The max size of the EXIF header is 64 KB. Am I correct? Is my understanding wrong? thats the reason why i was asking can we find out whether the image is EXIF or not without even opening the JPEG image in a buffer? Does symbian have any APIs to support this?
http://en.wikipedia.org/wiki/Exchang...ge_file_formatWhen Exif is employed for JPEG files, the Exif data is stored in one of JPEG's defined utility Application Segments, the APP1 (segment marker 0xFFE1), which in effect holds an entire TIFF file within. When Exif is employed in TIFF files (also when used as "an embedded TIFF file" mentioned earlier), the TIFF Private Tag 0x8769 defines a sub-Image File Directory (IFD) that holds the Exif specified TIFF Tags. In addition, Exif also defines a Global Positioning System sub-IFD using the TIFF Private Tag 0x8825, holding location information, and a "Interoperability IFD" specified within the Exif sub-IFD, using the Exif tag 0xA005.
Symbian && Android && iPhoneOS
In other words, no you've got it wrong - the Exif header is inside the JPEG image and you can't tell if it's present without opening the file. Even if it were the other way around, if the file extension is .jpg then how on earth could you tell without opening the file...?
Mark
Thanks Mark. I understood that. currently, we need to open the JPEG file to find whether it is EXIF or not. there is no function provided in the exif library which directly accepts the filename and returns whether the file is exif or not?
thanks everyone.
janza