Wednesday, 20 October 2010

Wednesday Surgery

Man(ga) Bites Dog

Krom, from theincidentreport enquires about lettering using the tools in Manga Studio Debut.

I apologize unreservedly, but I can't help with this. I have looked at the lettering tools in Manga Studio, both Debut and EX, and -- whilst I am a huge fan of the package -- the lettering tools are not fit for purpose at this time. Simple tasks like font selection are horrifically clunky, and the fine typographic controls over horizontal scale, tracking and the like, are either completely absent or so well hidden as to make them functionally useless.

However, Manga Studio's functionality is coming on leaps and bounds from version to version, and I plan to keep my copy up to date, so I promise to re-visit the lettering features every time I upgrade.

Warning: Contains Graphic Formats

Another common question that seems to be the source of some confusion relates to file formats, image compression and resolution, which I thought was worth a quick Wednesday post.

(Part Three of the Illustrator Guide will be along tomorrow or Friday, for those that are interested.)

Of necessity, this post vastly oversimplifies a hugely complex area, but even in these broad strokes it should give you some idea of how these things work, although if you are happy with the difference between TIFFs and JPEGs and know your DPI from your PPI, you can probably stop reading now.

To begin with, graphic file formats can be divided into two types: vector and bitmap.

Everyone will be familiar with vector data, since it is used in fonts. The shape of each character in the font is described mathematically to your computer and this is why a capital A can be scaled from 12pt to 72pt to 144pt without ever pixillating and becoming jagged.

Note, however, that if you have applied text to, say, a JPEG photo, it will become pixillated just like the rest of the image if you scale it up and print it out, or zoom into it on-screen. This is because JPEGs only support bitmap data, and you have converted the mathematical information in the original font into a collection of dots, pixels, just like the rest of the photo.

A bitmap graphic format is, to risk stating the obvious, precisely that: a map of the bits of data that make up an image. Imagine you have a set of coloured pens, 256 of them to be precise, each of them with a number on.

Imagine now that I read you a string of numbers. For the first number you take the corresponding pen and fill in one square on a sheet of fine-lined graph paper, and then move on to the adjacent square.

You can see that, eventually, you'd get a picture. However, you can also see that even with 1mm square graph paper, the grid is too coarse and the selection of colours too few to create, say, a convincing photograph. However, when you get right down to it, this is how all bitmap formats work. Note that this type of graphic format is sometimes referred to as raster graphics (there is a subtle difference between the two terms, but not enough to worry about here).

If you imagine that the graph paper is divided into 1-inch squares, and each of those squares is divided 300 times along the x and 300 times along the Y axis, then that image would be 300dpi. One square inch would contain 90,000 individual squares for you to fill in. 

Bear in mind that you're going to need more than 256 colours for a photographic image, and you start to see that detailed colour images are going to contain a lot of data. 

The key difference between bitmap graphic formats is how they choose to compress that data and reduce file size.

There are a lot of legacy formats floating about for all sorts of historical reasons but, leaving aside the native file formats of graphics applications like Photoshop's PSD or Painter's RIFF, formats like .bmp or .tga (or, frankly, .gif) are useless relics.

The JPEG file format has become largely ubiquitous, but it has no place in any print-based workflow, other than (arguably) for use as a low-res positional image. Let me say that again:

JPEGs have no place in ANY print-based workflow.

This is because JPEG is a "lossy" compression format. Designed in the early days of the internet when we were all stuck watching pages load one image at a time over a 14.4k modem, the JPEG uses a very clever algorithm to sacrifice detail in order to reduce file size. 

JPEG stands for Joint Photographers' Enterprise Group, who did some very clever research into the way that the human eye and the human brain can infer detail in a photo when it isn't actually there. Using this research, they were able to develop an algorithm that allows a portion of the information in the photo to be "thrown away" when the image is saved, and "reconstructed" when the file is displayed.

Imagine a photo that is a perfect square. The bottom horizontal half of the photo is all grass and children's toys and the horizon runs exactly across the middle of the photo. The top half of the photo is all one tone of blue sky, but the upper right quarter has a tree stump in it.

At its most simplistic, instead of going: Pixel 1, blue; Pixel 2, blue, Pixel 3, blue…the JPEG format divides that image into four squares. It looks at the first, top left quarter, which is all blue sky. This whole square can be described with one colour. Depending on the quality settings, it may well disregard some subtle variations in tone. 

Square Two is the same as square one, but has the tree stump. The algorithm will divide this square into four again. Three of these four squares are now sky and can be described with one colour, but the fourth still has the tree stump in it, so gets divided by four again, and so on.

The bottom half of the photo will require many more subdivisions because of all the detail contained in the grass, and the variation in colour provided by the toys.

Nonetheless, what the JPEG algorithm is trying to do is settle on a compromise between detail and file size that is "good enough", the level of "good enough" being defined by your choice of quality settings.

Imagine the same photo, but now you're saving as a TIFF with LZW compression. In this instance, the file achieves compression by this method:

Instead of going: Pixel 1, blue; Pixel 2, blue, Pixel 3, blue… It goes Pixel 1, blue; REPEAT x312 (or however many blue pixels there are in a row before there's a change of colour).

You can see that savings in file-size using a TIFF also favour limited colour palettes and/or areas of low detail, but TIFF achieves that saving without sacrificing any detail, which is why LZW is described as "Lossless" compression.

Even if the intended destination of your image is use on the web, the JPEG compression is sacrificing quality in your image. Keep your file in its native format (.psd for Photoshop, .ai for Illustrator) and "Save for Web & Devices" at the very end of the process.

There's much more to cover on this subject, but that will have to be a post for another day.

As always, if there are any questions arising from this post, or, indeed, on any other post to date, or if you just can't figure out how to do something in Illustrator, Photoshop, or Manga Studio, post the question in the comments here and I'll do my best to answer it in Sunday's surgery.


  1. Very informative Jim. You wouldn't be able to tell me (us) what you think the best settings are for saving TIFFs, would you? For example in AI, what is the difference between Mac and IBM PC compression? And what are the anti aliasing options for?

  2. Hi, Matt!

    For finished pages that are going to press, I have anti-aliasing on, and Mac, LZW, because that's what in my publishers' spec sheet. So far, everyone's wanted SWOP2 colour profile, too.

    One important note, which I'll include in a forthcoming part of the guide: for some reason AI's LZW TIFFs are unnecessarily large. This can only be down to bad implementation of the algorithm by Adobe, but you can reduce the files size by 30-50% simply by opening the TIFF in Photoshop, and forcing it to do something non-destructive but that will make Photoshop re-write the data.

    Try opening an AI TIFF in Photoshop, double clicking the background layer to make it Layer 0, then Flatten Image and hit Save. It's worth saving this as an action and then using it to Batch process a folder full of AI TIFFs if you're going to have to FTP them.



  3. Thanks for that Jim. Useful tip.

  4. As with most art apps, I assumed it was my own ignorance that made lettering in Manga Studio a nightmare.
    Not just me, though - heartening to know!

  5. Nah, it IS just you -- I only said that to make you feel better.