File:The Immortal Game.gif

Original file(800 × 800 pixels, file size: 1.69 MB, MIME type: image/gif, looped, 49 frames, 1 min 14 s)

Note: Due to technical limitations, thumbnails of high resolution GIF images such as this one will not be animated.

Commons-logo.svg This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is a freely licensed media file repository. You can help.

Summary

Description
English: Gif of the immortal game, without arrows or a coordinate border.
Date 1/26/25
Source Own work
Author Kaotao
GIF development
InfoField
 This GIF graphic was created with Python.
Source code
InfoField

Python code

Source code
#!/usr/bin/env python
# Plot a PGN game using python-chess and ImageMagick
import os
import chess.pgn
import chess.svg

pgn = open('immortal.pgn')
game = chess.pgn.read_game(pgn)
board = game.board()

def svg(i):
    s = chess.svg.board(board, coordinates = False, size = 800)
    f1 = "g_%04u.svg" % i
    f2 = "g_%04u.png" % i
    with open(f1, 'w') as f:
        f.write(s)
    os.system("magick %s %s" % (f1, f2))
    os.system("rm %s" % f1)

svg(0)
i = 1
for m in game.mainline_moves():
    board.push(m)
    svg(i)
    i += 1
# pause animation at the end:
for j in range(3):
    svg(i)
    i += 1
# create animation
os.system("magick -delay 150 g_*.png -loop 0 g.gif")

PGN

[Event "London"]
[Site "London ENG"]
[Date "1851.06.21"]
[EventDate "?"]
[Round "?"]
[Result "1-0"]
[White "Adolf Anderssen"]
[Black "Lionel Adalbert Bagration Felix Kieseritzky"]
[ECO "C33"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "45"]

1.e4 e5 2.f4 exf4 3.Bc4 Qh4+ 4.Kf1 b5 5.Bxb5 Nf6 6.Nf3 Qh6
7.d3 Nh5 8.Nh4 Qg5 9.Nf5 c6 10.g4 Nf6 11.Rg1 cxb5 12.h4 Qg6
13.h5 Qg5 14.Qf3 Ng8 15.Bxf4 Qf6 16.Nc3 Bc5 17.Nd5 Qxb2 18.Bd6
Bxg1 19. e5 Qxa1+ 20. Ke2 Na6 21.Nxg7+ Kd8 22.Qf6+ Nxf6
23.Be7# 1-0

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

The Immortal Game

Items portrayed in this file

depicts

26 January 25 CE

1,768,299 byte

800 pixel

800 pixel

image/gif

fcd6b7b90ce0e204eac779c40d14eb844fc1c4b9

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current21:43, 26 January 2025800 × 800 (1.69 MB)KaotaoUploaded own work with UploadWizard

The following page uses this file: