How two of Photoshopâ€™s most basic tools can turn a pixellated scan into a quality bitmap image
I suppose itâ€™s the initiation rite of any newspaper production designer: the sales repâ€™s client wants their logo scanned in for the next dayâ€™s ad, and when you ask for the Illustrator file or PDF they instead hand you a god-awful fax. â€œJust scan it in,â€ they say, and you know that no matter what you say or how you explain the real-life problem of working with poor originals, they will only beg you to make it work because itâ€™s easier than going back to the client and asking for a press-ready file that they have long since misplaced.
Did I tell you that the adâ€™s a full page? â€œYeah, sorry, I guess it will have to be blown up some.â€
This is when we have to deal with the â€œjaggiesâ€. I call it â€œpixellationâ€; my wife calls it â€œchunky.â€ When bitmaps are enlarged, when line art is scanned at a too-low resolution or when you are scanning original line art that has already been converted to a low-resolution bitmap (such as line art that has come across the fax machine), youâ€™ll get the block-by-block construction that makes curves and edges jagged and line art horrendous to look at.
But there is a Photoshop technique Iâ€™ve developed in production environments that will often eliminate jaggies or at the least minimize them, and it uses only two basic Photoshop commands that intermediate or even novice users are familiar with.
Figure 1: The “5 & Diner” logo.
This â€œ5 & Dinerâ€ logo (fig.1) was supplied to us by the client, and itâ€™s been scanned in from a slick at a resolution of only 200 pixels per inch. Line art resolution for good reproduction is 800ppi minimum, so this graphic will need some enlargement before we place it in the layout. No problem!
(1) Enlarge image to desired size with resolution of 800ppi or greater (fig.2)
Figure 2: Enlarged logo, complete with jaggies.
In this case we will keep the image size the same but increase resolution from 200ppi to 800ppi. You can convert a bitmap image like this to grayscale mode before enlarging and Photoshop will perform some anti-aliasing on the edges, but for a bitmap with this poor quality, enlarging to a resolution four times greater will still give you a bad case of jaggies. See the comparison (fig.3 and fig.4):
Figure 3: Enlarging in grayscale mode.
Figure 4: Enlarging in bitmap mode.
Iâ€™ll take my chances with the bitmap.
The next step, if you havenâ€™t done so already, is to:
(2) Set your image mode to grayscale
Youâ€™ll see why in a moment.
The next step will be to obliterate those craggy peaks, and weâ€™ll use one of Photoshopâ€™s most beloved tools to do it, the Gaussian Blur.
(3) Use Gaussian Blur to smooth out the pixellated edges
The key to a good blur is to blur out the details you donâ€™t want, in this case the jagged edges, while maintaining the details you do want, which are the lines, letters and shapes that make up the logo. I usually bring my Gaussian Blur slider all the way to the left (radius 0.1 pixels) and inch it toward the right until I see the jaggies disappear in a blurry haze. If we had stayed in bitmap mode, we would not have had the necessary blurring, just more jaggies.
Figure 5: Gaussian Blur at radius 3.5 pixels.
The â€œ5 & Dinerâ€ logo is a tricky one because it has a moderate case of jaggies but also has some fine details like the small letters and the thin white line between the two thick black lines. I donâ€™t want to blur those details into oblivion so Iâ€™ll settle for a blur of radius 3.5 pixels (fig.5). To compare the effects of different blurs for you, Iâ€™ll show two other examples here: figure 6 has a blur radius of 2 pixels, figure 7 a blur radius of 7 pixels.
Figure 6: Gaussian Blur at radius 2 pixels.
Figure 7: Gaussian Blur at radius 7 pixels.
Itâ€™s ironic that weâ€™re trying to achieve a sharp, smooth bitmap image by first making it a blurry mess, but thatâ€™s the way it works! Without Gaussian Blur the only way to remove the jagged edges would be to do some major retouching with the brush tool or even the pixel-by-pixel pencil tool, which has to be one of the oldest tools in Photoshop.
Now that weâ€™ve obliterated the jaggies, and any nice clean line art edges we once had, itâ€™s time to bring those clean edges back with one of Photoshopâ€™s most basic commands:
(4) Select Imageâ€“> Modeâ€“> Bitmapâ€¦ and convert to bitmap using the 50% threshold method (fig.8)
Figure 8: The bitmap image after 50% threshold conversion.
The 50% threshold method basically converts every gray pixel below 50% into white and every gray pixel above 50% into black, and the blurred logo becomes a sharp bitmap again, with the edge of the line art falling right where the blur was at 50% gray.
At this point you are done executing the technique, and have hopefully made your pixellated image into one that can pass for a smooth vector graphic. But I want to illustrate how too much blur or not enough can affect your image.
If you blur too little you will still have some pixellation; if you blur too much the logoâ€™s details will become misshapen, including rounded corners and small white space plugging with black. I am going to execute the bitmap conversion in step four to my other two blurred images and see how they are affected.
Figure 9: Bitmap conversion after Gaussian Blur, radius 2 pixels.
Figure 9 (originally fig. 6, blur radius of 2 pixels) still shows some pronounced jaggies, though mostly it has become more wavy than jagged. This is because Gaussian Blur at such a small blur radius smoothed away only the peaks of the jaggies. But with a blur radius of 2 pixels it seems the resulting bitmap has more readable letters, since the counters (those little white spaces inside the letters) donâ€™t plug with black so much.
Figure 10: Bitmap conversion after Gaussian Blur, radius 7 pixels.
Figure 10 (originally fig.7, blur radius of 7 pixels) has lost the shape of its letters: the â€œFâ€ characters have lost their legs and the counters have been swallowed up. But those jagged edges are almost completely eliminated; all thatâ€™s left is a bit of a wave going through the outer circle.
The amount of blur you use is up to you. Some cases will require more than others and sometimes you will have to judge whether elimination of the jaggies or preservation of the logoâ€™s fine details is more important. It depends on the logo, the original you are working with, and the clientâ€™s preferences.
Smoothing out rivers
Figure 11: This logo was supplied with far too little data to make usable line art.
Here is one more example that came across my desk recently. This logo (fig.11) was supplied to me by the client, not as a vector EPS graphic or PDF but as a lowly image embedded in a Word document. Bringing it into Photoshop revealed its resolution to be a weak 300ppi and size of only 1.5 inches wide, which meant trouble because the client wanted it to go all the way across their letter-sized flyer.
Figure 12: The logo after enlarging to full-page size.
Enlarging the image to the desired size created some fierce jaggies as I expected (fig.12). I decided that the fluidity of the line was the most vital and so I cleared away the jaggies with a simple Gaussian Blur of radius 15 pixels (fig.13).
Figure 13: After Gaussian Blur, radius 15 pixels.
Converting to bitmap mode using the 50% threshold method created a wonderfully smooth and fluid line graphic (fig.14) with all the resolution and size I needed for the flyer.
Figure 14: The final bitmap image, completely smooth.
A type trivia treat
I’m sure you noticed that while my white line logo turned out smooth, so did my type, to the point where it was illegible. That’s not good. But I didnâ€™t flinch because I knew it would be far easier and better to retype it in my favorite layout application. Iâ€™ll give ten points to whoever can tell me what typeface that logo is using. Bonus points for those rabid type-junkies who can calculate the point size and tracking amount!