Sabattier effect in processing

please format code with </> button * homework policy * asking questions

Hi, does anyone know how to do the Sabattier effect in processing?


1 Like
  1. Find out what the effect is. Hint: Gradients
  2. Get the pixels
  3. Apply your sabbatier() function
  4. Update the pixels
  5. Display

If you need speed, do it in a GLSL shader.

1 Like

Try to look at how it’s actually implemented in image editing softwares for example :

Of course Man Ray did a little selective overexposure…the bluish brightening is my weak attempt of mimicing that.
Sketch i just wrote shows
Source on request, but try yuor own first

That’s what I’m talking about, could I have the code to rehearse, please?

Ah well…make it better, and share.

PImage pic, sab;

float aspect;
float piwi;

void setup() {
    // "face.png"
  if (aspect>1) piwi/=aspect;

void sabbatier(int[] pixels) {
  for (int i=0; i<pixels.length; i++) {
    int c=pixels[i];
    float blue=(c&0xff)/255.0f;

float sabbatier(float u) {
  final float lim=0.2f;
  float r;
  if (u<lim)
    r=map(u, 0, lim, 1, 0);
    r=map(u, lim, 1, 0, 1);
  return r;

void draw() {
  image(pic, 0, 10, piwi, piwi*aspect);
  image(sab, 0, 20+piwi*aspect, piwi, piwi*aspect);


of course, thank you very much!!

1 Like

If the Sabattier effect is worth encapsulating as a configurable effect, it might be worth proposing to @Milchreis as an addition for this library:

1 Like

Very good idea Jeremy. I created a ticket for that :slight_smile:


And in case you really want to know, in depth explanations are at

Somewhat contradictory:

This process was identified by Armand Sabbatier in 1860, involving partial solarization of high contrast prints, during the development process.

Sabatier (often misspelled Sabattier) was a doctor of medicine in the small French village of Saint-Mammers. He has been regularly confused with Armand Sabatier, a marine zoologist of the era, who published nothing on photography.

And also wiith Paul, Sabatier, Nobel Pricre for Chemistry 1912…but he wss born in 1857

The effect was first described in print by H. de la Blanchere in 1859 in L’Art du Photographe. It was described again in 1860 by L.M. Rutherford and C.A. Seely, separately, in successive issues of The American Journal of Photography, and in the same year by Count Schouwaloff in the French publication Cosmos. By rights the phenomenon should have been christened the Blanchere Effect, for it was not described by Sabatier until later in 1860 in Cosmos. Sabatier must have been aware of Schouwaloff’s earlier paper in the same publication, but he makes no mention of it.

So now we know…