I have a program that converts images into gifs. the Frames are created at certain times, (epoch) Im wondering if each frame retains the creation time, in a timestamp, perhaps in the header info of each frame?

If this is the case, is there a simple means to get that info?

  • How would this be related to C++? – Seth Jan 31 '17 at 7:27
  • its written in C++. I might not care for this program, how to read timestamps info, if it is present. (but thats what im asking, is timestamps info present in gif frames? it was present in each png, before I converted them to gif.) – j0h Jan 31 '17 at 12:01
  • But did you write that program? If so you should probably know. I'll remove the tag meanwhile at it doesn't really have anything to do with the question. Look at the answer for ... well an answer on whenever the timestamp is contained. – Seth Jan 31 '17 at 12:15
  • Thats not what I'm asking. Images, files in general, have headers, and timestamps are some of that data. I can put a timestamps into a file, but I'm asking if the frames of a gif have this info individually... I can see I'll be figuring this out myself. – j0h Jan 31 '17 at 13:32
  • Or you could just read the document as it explicitly states that that header in my answer is the header for each individual frame. As it doesn't have a field for free form data there is no space for a timestamp. But I guess if you won't read the spec for the file format you're asking about, even after being pointed to the section that is relevant, you will be poking around in a hex editor for a while. – Seth Jan 31 '17 at 13:39

If you look at the spec for GIF89a it's a no (check 20. Image Description).

This block is REQUIRED for an image. Exactly one Image Descriptor must be present per image in the Data Stream. An unlimited number of images may be present per Data Stream.

Which lists the following fields:

  • Image Separator
  • Image Left Position
  • Image Top Position
  • Image Width, Image Height
  • Packet Fields (Local Color Table Flag, Interlace Flag, Sort Flag, Reserved, Size of Local Color Table

In addition as you can have differential images and such it wouldn't make a lot of sense as there might simply be no original time.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.