×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    8

    How to find whether the given JPEG file is EXIF complaint or not?

    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

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: How to find whether the given JPEG file is EXIF complaint or not?

    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

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    8

    Re: How to find whether the given JPEG file is EXIF complaint or not?

    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

  4. #4
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721

    Re: How to find whether the given JPEG file is EXIF complaint or not?

    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

  5. #5
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: How to find whether the given JPEG file is EXIF complaint or not?

    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

  6. #6
    Registered User
    Join Date
    Mar 2009
    Posts
    8

    Re: How to find whether the given JPEG file is EXIF complaint or not?

    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?

  7. #7
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721

    Re: How to find whether the given JPEG file is EXIF complaint or not?

    When 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.
    http://en.wikipedia.org/wiki/Exchang...ge_file_format
    Symbian && Android && iPhoneOS

  8. #8
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: How to find whether the given JPEG file is EXIF complaint or not?

    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

  9. #9
    Registered User
    Join Date
    Mar 2009
    Posts
    8

    Re: How to find whether the given JPEG file is EXIF complaint or not?

    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.

  10. #10
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148

    Re: How to find whether the given JPEG file is EXIF complaint or not?

    Quote Originally Posted by devarajgs View Post
    The max size of the EXIF header is 64 KB.
    I think this limitation has not been explicitly stated anywhere, but in practice this is the case because the length of the exif header must be indicated by 16-bit field. Also thumbnail must fit into this 64 KiB, so that puts some restrictions to the thumbnail size.
    janza

Similar Threads

  1. Tips on using NDS 1.1
    By mitts in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-01-18, 16:07
  2. Replies: 1
    Last Post: 2005-05-26, 14:22
  3. Replies: 0
    Last Post: 2002-06-10, 12:24
  4. API for Jpeg file decompress?
    By Denever in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-06-03, 03:42
  5. How can I find the correct Lib file????
    By Nokia_Archive in forum Symbian
    Replies: 1
    Last Post: 2002-06-01, 20:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •