zco.mx

Knowledge Base

User Tools

Site Tools


howto-ps

HowTo: Edit a B&W Page in Photoshop

This wiki page covers how to scan line art.

Note: Before making any edits to a scanned image, sometimes called a raw image, it is recommended to work on a copy and not on the original. This way if things go wrong, a re-scan isn't required.


Converting RGB to Grayscale

If the black and white art was scanned as colour, then convert it to grayscale. (There is no reason to set your scanner to grayscale, since its sensor is colour by default – and Photoshop does a better job at converting.)


Rotating/Straightening

Select the ruler tool:

Draw a ruler along the border you want to straighten. It doesn't matter if horizontal or vertical:

Select Arbitrary from the Image Rotation menu and press OK (keeps the image as background layer) – or press Straighten Layer in the context menu (converts background to a layer). Both will achieve basically the same for our needs:



Cropping

The goal here is to get the outer borders and an image aspect ratio that are the same for each page. For that we're going to use a fixed aspect ratio.

Use the Rectangular Marquee Tool, set it to Fixed Ratio and guesstimate the aspect ratio of the page. This requires some trial and error. It doesn't have to be absolutely exact:


This page has a width-to-height ratio of about 1:1.37:

Finally, crop your selection:


Curves a.k.a. Contrast (Nondestructive)

To set the overall contrast level of the page we create a curves 'adjustment layer' by clicking on the icon at the bottom of the layers toolbox. Its controls should pop up automatically – if they don't just double click the curves icon on the newly made adjustment layer. We do this in a control layer instead of in the image itself, so we can reset and start anew if the result is unsatisfactory.

First we set the black point of the image. Choose the uppermost of the three eyedropper tools in the pop-up. Set the page magnification to around 400%, so you can easily pick a really dark pixel and sample it with the eyedropper. Go back to 100% or smaller magnification and check if the blacks look good now. Click the eye icon in the pop-up to enable/disable preview. If dense line material, e.g. cross-hatching, looks too dark, choose an even darker pixel with the eyedropper tool.

Next using the bottom most of the three eyedropper tools, we set the white point of the image. Do not choose the brightest white pixel, but an average, faintly grayish pixel. We want to get rid of paper imperfections, pencil traces, and smears – and there is no artwork in the highlights of the page to worry about.

Finally we do a 'shadow boost' on the curve itself. Create a new edit point in the middle of the diagonal line and another one in the first quarter from top. Gently nudge the latter edit point a bit to the right and down, so the dark levels get a bit lighter – without influencing the true black level or the white levels of the page.


Duplicating the Working Layer

From now on we're using 'destructive' editing techniques, so we duplicate the image layer and continue working on the copy layer, keeping the original background layer untouched. Right-click the background and select duplicate:


Quick-Fixing the White Areas of the Page

Now that we have a good overall contrast, we're going to do a quick and dirty removal of pencil traces and other leftover smudges. The Magic Wand is our friend for this job. Make sure you're on the correct working layer:

Set it to a low-ish tolerance, around 10-20, and uncheck contiguous. Click into a white area on the page to sample. Then open the Refine Edge menu:

Give the edge some slight feathering and shift it inwards, so we do not capture any actual line art. The preview should be mostly white with unwanted pencil traces:

Press OK in the Refine Edge menu and open the Levels tool:

Shift the rightmost level slider to the left, beyond the 'hump' of not-quite-white content:


Checking for Clean Borders

This is something that is easily overlooked, but looks disastrous in the final image: dirty page borders. Let's set the Photoshop background to plain white:

Now we behold all the nasty stuff:

There are many ways to fix this. The quickest way is to delete it. Use the Rectangular Marquee tool and set it to Normal:

Select all four outer borders (draw outer marquee normally, hold Alt while drawing inner marquee to subtract it) and delete them:


Fixing Transparency

Now that we deleted the border of our working layer, we're left with transparent areas where the original layer shows through. To fix that, we create a new layer below our working layer:

We fill that new layer with the Paint Bucket tool, with white as foreground colour:


Editing the Page

While there's only two screenshots for this chapter, it's actually the most time-consuming part of the whole procedure. We use a white brush to clean all the specks and dots that haven't been caught by earlier editing steps. Use 100% flow and opacity and a soft brush border. Work at whatever magnification you find comfortable. Something between 100 and 400% should do nicely:

For hard to reach spots, e.g. between two narrow black lines, use the Dodge tool. Set it to work on highlights, around 5-10% exposure, and gently remove the grey pencil remnants:

Conversely, if you have inked areas which are not dark enough, do the same, but with the Burn tool (set to shadows).


Improving Text Legibility

This is an optional step but it can improve the overall legibility of a comic. If text on the page looks a bit too soft or blurry, we can tighten the contrast. Let's use the Quick Selection tool:

Select the insides of speech bubbles and refine the edges; the same as we did before:

Add a tiny bit of feathering and shift the edge inwards. The preview should show text only, give or take a few:

For more contrast and thicker line-width, open the Levels tool and shift the middle slider to the right.


Saving the PSD File

Finished with the editing wizardry! Time to save the edited page as a PSD file and store it somewhere safe. Make sure to include layers:


Archiving the PSD File

See this wiki page for more information on how to backup files.


Exporting to PNG for the Web

First we need to resize the image. Usually we go by standard monitor resolutions. Nowadays a width of 1600px (portrait) or 2560px (landscape) seems reasonable. It should result in perfect readability, yet still manageable download sizes. Make sure Constrain Proportions is checked. For portrait images use a width of 1600px. For landscape images use a width of 2560px. The height will be calculated automatically.

For the resampling algorithm, choose one of the bicubic filters. For downsizing images usually Bicubic automatic or Bicubic sharper works best. In the end it depends on your taste, so do a bit of trial and error and stick with what you like:

Next the goal is to produce high quality images with file sizes as small as possible.

Export the page with Save for Web.

Choose PNG8 with the Perceptual algorithm. In the Colors field, choose a number of colours that's high enough so the Optimized image looks as good as the original. Usually, black and white line art needs 8 to 16 colours to be indistinguishable from the original. Images with a few colours 16 to 32 should work. The maximum colours of 256 is most often a waste of resources.

Make sure to look at the preview window at 100% magnification and compare the Original to the Optimized file.

We can ignore all other export settings since we already resized the image earlier.

See here for a way to automate batch exporting of PNG files.