Polish version

printing color photos on a black-and-white printer

This text is translated from Polish by chat GPT.

I have a regular black-and-white laser printer at home. Recently (autumn 2020), I was thinking about how to print color photos on it.

For instance, I could separate the photos into H, S, and V channels and print each channel individually. Then, if someone wanted to view the photos in color later on, they could transfer them back to a computer and recombine the channels.

I experimented with this image:

I separated it into H, S, and V channels with this command:
$ convert obrazek.jpg -colorspace HSV -separate kanal_%d.gif

Here are the results:

I printed these on my printer, took photos with my phone, transferred them to the computer, resulting in:

I imported them into Gimp, adjusted levels to align the images, saved them to disk, and then recombined the three channels back into a color image with this command:
$ convert h.png s.png v.png -set colorspace HSB -combine -colorspace sRGB wynik.png

Here's the result:

It reminds me of the color photos in the '80s magazine Szkiełko i Oko.

Three years later, in December 2023, I revisited the project. This time, I wanted to do it more meticulously: before separating and printing the image, I added registration marks (to align layers during assembly) and color samples (to adjust levels in each channel post-photographing, ensuring colors were accurately represented).

Here's the image with added registration marks and color samples:

Then, I separated this image into HSV components using the command:
$ convert 03-z_paserami.png -colorspace HSV -separate 04-kanal_%d.png

The result looked like this:

Since the H and S channels were darker than expected, to save toner, I inverted them using these commands:
$ convert 04-kanal_0.png -negate 04-kanal_0_negatyw.png
$ convert 04-kanal_1.png -negate 04-kanal_1_negatyw.png

The result was (showing channel V as well for completeness, which remained unchanged):

Next, I printed this on my home laser printer, took photos with my phone, transferred them to the computer, adjusted levels and inverted the first two channels to match the grayscale levels of the color samples in each channel before printing. Here are the results:

Then, I recombined these three images into a single color image. I used the command:
$ convert 07-spasowane_kanal_0_hue.png 07-spasowane_kanal_1_saturation.png 07-spasowane_kanal_2_value.png -set colorspace HSB -combine -colorspace sRGB 08-result.png
Here's the result:

It turned out quite nicely. Of course, what "nicely" means depends on whether I want it to be as faithful as possible or if I'm looking for interesting artifacts. I didn't dwell on that; for now, if it looks good to me, it's good. Anyway, it came out nicely, except for that pepper. Not only is its color distorted, but it's also so radically different from the tomato color! Why? - I wondered. Their colors are so similar in the original photo.

After thinking about it and experimenting, I understood. Take another look at the H channel (hue):

Do you see that in this channel, the tomato is black and the pepper is white? Of course: hue is a circle (going through the colors starts with red, then goes through blue, green, yellow, and back to red. The grayscale is a continuum. When mapping a circle onto a line, there must be two points where on the circle they are very close together, but on the line they are extremely far apart. And in my case, it happened to be on the color red - which can be represented both as white and as black. Now, consider what happens if the hue levels shift during printing and photographing (meaning that white becomes light gray, or black becomes dark gray, or light gray becomes less light). If this change affects some intermediate grays, the effect won't be very noticeable - just slightly skewed colors. But if it affects black or white, for example, if white gets slightly dirtied, then one red, represented by the black hue channel, remains unchanged, while another very similar red in the original photo, represented by the white hue channel, shifts significantly. And that's what happened to me. The pepper is represented by white, that white got grayed, so the color of the pepper shifted away from the tomato color.

To fix this, I adjusted - I think in Gimp - the levels in the hue channel image so that the pepper became lighter. Just a bit, like this:

Then I recombined the three channels, and this time it turned out like this:

Now I'm satisfied with it.