Quantcast
Channel: WP快站
Viewing all articles
Browse latest Browse all 233

How is this animated PNG image aware of the current time and date?

$
0
0

I received an email from a company which has a countdown like this in it:

(This is not the "live" one, it's a copy - as a GIF, not PNG - of how it looked at one point, since the countdown has now ended and no longer displays on the original image's URL).

I viewed the HTML source of the email and it is simply an image file, as below:

<img src="https://www.example.com/f70f250cd4f777ac.png">

As far as I was aware before now, only GIF files could be animated, not PNG files - but I see from searching online that this is apparently called an APNG file.

I am aware of libraries like which you can make images in on-the-fly by writing code in etc, but the page isn't reloading when you open that image's link and from experience of using GD + PHP a while ago, you can't write to the image again once headers have been sent to the browser. Even when you refresh the page, the animation resumes at the same point in the countdown image above.

What technique have they used to create this countdown? / How could I make a countdown image to be sent in an email?


Viewing all articles
Browse latest Browse all 233

Trending Articles