Creating a Digital Negative of the Shroud of Turin

Drew Jaja
4 min readSep 5, 2023

--

The Shroud of Turin is an ancient artifact, which is said to be the burial cloth of Jesus Christ. The shroud is a large rectangular linen cloth with a faint image of a man’s body. It is the most scientifically studied artifact in history.

In 1898 a photographer named Seconda Pia took the first photograph of the shroud. On inspection of the photographic negative, he discovered something amazing, the negative revealed more discerning human features. The faint image on the shroud was in fact the negative image of a man and the photographic negative revealed the positive image. Two negatives make a positive.

Photograph of face imprinted on the Shroud of Turin (Left). Digital negative image (Right). Credit Wikipedia.

I was curious if it’s possible to re-create this photographic negative digitally and it turns out it’s quite easy. You don’t need a photo editing program, all you need is a text editor and a modern browser.

What is a negative image?

In photography, a captured image needs to be persisted somehow. Before digital photography, the image would be persisted on a film. In black and white photography the film would contain a layer of silver halide crystals. These crystals would react to the photons of light entering the camera’s lens. The reaction leaves what is called a latent image. The film would then undergo a process called development, which involves immersing the film in a chemical solution. The chemicals in the solution convert the crystals that reacted to the photons of light into metallic silver. This process results in what is called a negative image, as the areas of the film having most photon exposure become dark and the areas of the film having least exposure remain light.

In color film, there are red, green, and blue color sensitive layers. Each layer contains silver halide crystals just like in black and white film, although the layers react to different wavelengths of light. During the development process each layer forms a complementary colored dye in proportion to the intensity of light they are exposed to. The red, green and blue color sensitive layers produce cyan, magenta, yellow dyes respectively. This process results in a color negative, the original image with its colors inverted.

What is RGB?

RGB is an additive color model where the combination of red, green and blue produce different colors. It is similar to the way the human eye perceives colors. The human eye has color sensing cones that only senses red, green and blue colors. It is said that we can distinguish around 100 shades of red, green and blue allowing us to perceive up to 1 million (100³) different colors.

On a computer an RGB value is stored as 24 bits, which gives 8 bits each for Red, Green and Blue. 8 bits gives a possible range of numbers between 0 and 255. Up to 16.7 million (2²⁴) colors can be represented with 24 bits.

Below are some complementary RGB values.

White   (255, 255, 255)
Black ( 0, 0, 0)

Red (255, 0, 0)
Cyan ( 0, 255, 255)

Green ( 0, 255, 0)
Magenta (255, 0, 255)

Blue ( 0, 0, 255)
Yellow (255, 255, 0)

We can create a simple python function to get the inverse of an RGB value

def invert_rgb(r: int, g: int, b: int) -> Tuple[int, int, int]:
return 255 - r, 255 - g, 255 - b

What gives an object its color?

Objects don’t actually have an inherent color. The color we perceive of an object is actually the light reflected off it. Leaves are green because they contain chlorophyll, which utilizes red light and blue light for reactions and reflects the unused green light. Note that red and blue produce magenta (255, 0, 255), which is the inverse of green (0, 255, 0).

Chlorophyll absorbing red and blue light, but reflecting green light. Credit Wikipedia.

Digital Negative with CSS

A digital negative can be created by running the invert_rgb() function mentioned above over all the pixels of an image.

A simple way to do this in html/css is to use the invert filter effect.

<!DOCTYPE html>
<html>
<head>
<style>
.invert-colors {
filter: invert(100%);
}
</style>
</head>
<body>
<img class="invert-colors" src="shroud.png" >
</body>
</html>

The Mystery

The Shroud of Turin is the earliest known durably imprinted negative in history. It has been carbon dated to 1260 AD — 1390 AD, although there are doubts of its accuracy.

The next known durably imprinted negative was made by a French inventor named Nicéphore Niépce in 1826 AD. He used light sensitive bitumen over a pewter plate and several days of light exposure to capture the negative image. Outlines of trees and buildings can be seen, although the features aren’t as discerning as on the shroud.

Durably imprinted negative on pewter plate by Nicéphore Niépce in 1826 AD. Credit Wikipedia.

The image on the Shroud of Turin was imprinted at least 500 years before photography was invented. It is the most scientifically researched artifact in history, yet how the negative image of a man was durably imprinted on the linen cloth many centuries ago remains a mystery.

--

--