[Layout &ct] Image trapping & File types

I'm screwing about with the art for Hoard, trying to get the file size to be reasonable.

I just went through all the art (something like 60 pieces), shifted all the art to read-as-grayscale (which it is), did contrast and vector things, and recopied it into the main file - and my file size cut in half.

Right now, everything's a JPG. Now, I'm trying to figure out if converting to a different file type will make for a smaller PDF without losing resolution when I print to that format, and nonsense like that.

Anyone know a bunch about this nonsense?

Comments

  • Sure.

    JPGs probably the way to go for what you want here.

    So, first off, you converted it to grayscale. That's good. What the heck do you mean specifically by "did vector things"? That doesn't jive in my brain as I mean something different by vector.

    Second, when you say "it is" grayscale, do you mean that the art is black and grayish with some shading? Or, possibly, is the art ALL black only? It's likely the former, and you're on the right path. But, if it really is all lineart, you can save HUGE amounts of file size.

    JPG is probably the smallest format you're going to be able to use. It compresses file sizes. Now, the trick is resolution. Depending on how you're going to use the PDF, you can get away with a little bit of sneaky reduced resolution that works fine for many uses. For example, 300 dpi resolution is pretty standard for printing images. But, really, you can get away with 233 dpi or as little as 150 dpi for most uses. It reduce file sizes considerably, and still looks pretty good to most eyes.

    Careful with those JPGs, though. They can introduce a kind of fuzz on an image when you really start to compress. I much prefer working with TIFFs for quality reasons. I hate that image fuzz that develops. But, you're right that JPG file sizes will be smaller in most cases. It's a matter of tweaking and balancing file size with quality.

    Also, you want to make sure that the "print size" of your images is exactly the same as what you've got placed in your layout software. For example, sometimes you might place an image then size it down to fit an area in the layout software. Instead, make sure the original file is already that size.

    IMPORTANT: Make sure you save original versions of your better resolution images. You can't make reduced resolution images "bigger" later on.
  • edited November 2007
    Posted By: Matt_SnyderSo, first off, you converted it to grayscale. That's good. What the heck do you mean specifically by "did vector things"?
    I vectored-traced a bunch of the pieces to clean them.

    Most of the art actually is black & white, but I find that reducing it to that type pixellated the crap out of it... Is it worth sizing up the image and Pixels-per-inch (so that the pixellation will make no nevermind) in order to go to black&white?

    As in - which makes more impact on size: Black & White, or adding resolution?
  • edited November 2007
    Ok, here goes:

    Here is a little tutorial and comparison for the various options I've mentioned.

    First, I'll explain some file sizes. Then, recommend and show how to save it as "bitmap" or "lineart" successfully.

    I saved a cow skull image I have. It's about 15 picas wide on the page (about 2.5 inches). Here is the comparison:
    FormatResolutionFilesize
    JPG300 dpi 172 KB
    JPG150 dpi 81 KB
    TIFF1200 dpi (bitmap) 115 KB
    Looking at this, I'd definitely choose the TIFF bitmap version. It's the same printing size as the JPG and will have extremely good quality on printed pages. And, it's still only 66% the size of the JPG. Definintely the best balance between size and quality.

    Here's how to do it:

    STEP 1
    image
    This first step has one part I didn't sreen capture, but it's the fundamental piece! Now, keep in mind, the picture should be all one color. No shading. This won't work well otherwise.

    So! Open the image and make sure it's the size you want. It should be at 300 dpi resolution ideally. That's what the picture above shows for this cow skull.

    STEP 2
    image

    In Photoshop, go to the Image menu. Select Mode, and then select Bitmap. When you do that, you'll see the pop-up menu I've got above in this second screenshot. It will come up with the resolution the image is currently set at, so 300 dpi in this case (and, hopefully, in your case).

    STEP 3
    image

    Change that pesky pixels-per-inch from 300 to 1200. This is really necessary to get the quality you'll need for this file size. Don't sweat. This works fine, and still keeps file sizes smaller.

    STEP 4
    image

    After you do that, you might see some crummy edging on your picture. This is normal. This screenshot above shows my cow skull at 100%. See how scratchy it is? No problem. It'll come out fine. (The trick is that it's HUGE -- 1200 pixels per inch!)

    STEP 5
    image

    This is just a sample of the same image at 300 dpi at 100% to compare above. This is what your pic would look like as a 300 dpi grayscale image. What it lacks in size it makes up for in number of colors of grays to get fine detail. It LOOKS better. But, in fact, it's not really much different. Again, because the pic in Step 4 is huge.

    STEP 6
    image

    Save the image as a TIFF. This screenshot shows the alert Photoshop throws your way after hitting save. I just do the default on my machine -- some compression via LZW is fine. I never run into problems doing this. Some people like to avoid compression. (I suppose it's possible that one way or the other converts to PDF better, but I've never figured that out.)
  • When Snyder talks dirty he always uses picas.
  • Good shit, Matt.
  • I've been having an interesting experience working on layout for the Starblazer RPG coming from Cubicle 7 (which is based on the Spirit of the Century SRD), that sort of falls on these lines. A lot of the scans of images are from the pages of a decades-old British comic book, black and white. So the scans tend to come in very large sized and full of newsprint-grey grainy backgrounds. Cleanup has been necessary across the board to take these from grainy-not-good-for-an-RPG grey muddled images into high contrast black and white.

    But the solutions are pretty simple. They include:

    - Cranking the contrast dial up to maximum to turn the image into a straight up black and white image
    - Using the magic wand tool to select the "white" areas; then select->modify->expand 1px; select-contract-contract 2px; delete to clear out all the little black dots in the white area that the page grain left in.
    - Using the magic wand tool to select the "black" areas; then select->modify->expand 1px; select-contract-contract 2px; edit->fill with black, to take all of the mottled-with-white-dot black areas of the image and turn them into smoother pure black details for a more striking appearance

    In general this took a textured grey background comic book image very successfully into a high contrast stark white/deep black image that was about 10% of the filesize it was before (saved as a grayscale TIFF). This means that I took what was around 1 GB of grey scanned images and turned it into around 100 MB. Vast spatial savings. The principle's simple: the fewer distinct colors your image has, the smaller it's going to be in the filesize, because each pixel of data stored needs to be large enough to contain all of the *possibilities* of what color it could be. When those possibilities are simply: black, or white -- then that pixel just needs to be a single binary value (0 for black, 1 for white).
  • edited November 2007
    Ok, there's another way to do this that should have much better results in terms of image quality. I've used it a lot on scanned artwork to remove a huge amount of headache. Depending on the pic, though, there's still some cleanup work to be done. But, this saves lots of time and especially quality. I really don't like adjusting contrast levels as I find it harms the quality of the image more than this technique below.

    1) Open the scanned pic with all the gray / grainy / paper-y "noise." If you want, zoom in a bit on some area that has noticable "noise" to get a better view as you proceed.

    2) Go to the Image menu, then pop-up the Adjustments and select Levels. I'm using a scan/pic of some parchment. It's not exactly like scanning illustrated art, but hopefully it'll make some sense as I explain this:

    image

    3) Adjust the levels. Basically, what you're seeing on this graph is the amount of data in the digital image. There's a low end, a mid-point, and high end. (There's probably all kinds of technical mumbo jumbo that I don't know here; I just know what works for me.)

    I've circled these three thingy's in this picture below. Basically, you grab ahold of each one by click-and-holding them and sliding them back and forth.

    In nearly all scanned images you'll have large areas with very little data. That is, they're basically flat. You can slide like crazy and have very little effect on the whole of the image. But, when you slide the little arrows below where there's lots of data, the picture starts changing dramatically. You can really use this to varying effects. One is eliminating noise.

    Give it a try and play with it. Slide the high end back and forth, then the low end. And, finally, fine tune it with the midpoint arrow.

    The screenshot below shows where I set the arrows to elminate a BUNCH of gray "color" on this parchment, effectively turning all but the border of the image into white area.

    image

    4) Now, you're left with an image that's ready or mostly ready. Most images will have some darkers spots and artifacts from the paper. They might be dirt or dust, or just a stong dimple shadow or whatever. You can simply erase them out, assuming your white is truly white. (Sometimes, you might turn it mostly-white-but-sorta-gray. In which case your Erase will show up, especially on a good printer.)

    Here's the parchment with a strong white area in the center, and only a basic gray around the edging.

    image

    This effect cleans the hell out of photos in terms of noise. That is, how it looks. It will save some space on the file size, but not nearly as much as going to Bitmap mode (basically literally only 1 color, i.e black), as Fred discovered. You could go that next step, but you may have to really kick up that resolution (like my previous post) to keep the quality of the edges. This parchment thingy, for example, wouldn't look too good. Comic art should be much better off.
  • edited November 2007
    The great thing about Matt's Levels technique is that it can be non-destructive. Go over to the bottom of your layer palette and choose the little half-white, half-black circle: "Create new fill or adjustment layer." Then choose "Levels...." This will create a layer that is only the Levels adjustment settings, which will affect everything below it without changing the original artwork. And, even better, you can go in and double click that adjustment layer later and change the settings.

    For photographs it is almost always safe to move the black and white sliders inward so they are just below the largest area of image information. This will often greatly improve the apparent quality of a photo.
  • Another thing to point out vis a vis the final PDF file size is that you can control how the PDF distillation process actually stores the images within the PDF.

    Basically, you need to change the Job Options (wherever they are in your application or distillation path--varies widely by application) so that the images are ZIPped (NOT JPGged) when embedded in the PDF. Then, even your "monster" TIFF files will get some significant lossless compression.

    Also, check your Font Subset settings: as you don't expect to edit (Touch-Up Text tool) the book as a PDF in Acrobat, you do not need to include any unused glyphs (letters, numbers, and symbols) in your fonts. Read here:
    http://createpdf.adobe.com/cgi-feeder.pl/help_fonts?BP=&LOC=en_US
    ... and set the Subset Embedded Fonts When Percent of Characters Used Is Less Than option to 100%. This ensures that only those glyphs that are in use are embedded, which is VERY important form some common "megafonts" like Ariel, which typically include a bajillion glyphs for foreign languages and special characters (check it out in Character Map).

    HTH;
    David
  • Posted By: David ArtmanAlso, check your Font Subset settings: as you don't expect to edit (Touch-Up Texttool) the book as a PDF in Acrobat, you do not need to include any unused glyphs (letters, numbers, and symbols) in your fonts. Read here:
    http://createpdf.adobe.com/cgi-feeder.pl/help_fonts?BP=&LOC=en_US
    ... and set theSubset Embedded Fonts When Percent of Characters Used Is Less Thanoption to 100%. This ensures that only those glyphs that are in use are embedded, which is VERY important form some common "megafonts" like Ariel, which typically include a bajillion glyphs for foreign languages and special characters (check it out in Character Map).
    You can get goosed by that too; I've had some (old-hardware/software) print on demand suppliers (in Europe, possibly elsewhere) fail to be able to handle tons of subsetting-- which can happen when you set this option to 100%. I've certainly created fatter PDFs when I've set it to 0%, but I've also eliminated some printing problems -- just something to keep in mind.
  • Posted By: iagoYou can get goosed by that too; I've had some (old-hardware/software) print on demand suppliers (in Europe, possibly elsewhere) fail to be able to handle tons of subsetting-- which can happen when you set this option to 100%. I've certainly created fatter PDFs when I've set it to 0%, but I've also eliminated some printing problems -- just something to keep in mind.
    Sure, worth a test print in a variety of countries at the least--it should be easy to find volunteers, by just giving them a copy for their efforts.

    But I've heard this is more of a PDF 1.3 issue than "merely" extreme subsetting. I find it difficult to imagine a situation in which an unused glyph *must* be embedded in the PDF to allow printing--I'd put the blame for that squarely on the RIP engine of the printer. Unfortunately, it can be tough from a business perspective to tell a customer "your printer sucks, not my fault;" but the alternative could be anywhere from 400 kb to megabytes of bloat (if you use a lot of megafonts). Who wins then? Every downloader--and your server bandwidth--suffers so that folks with obsolete hardware can print-out your PDF rather than buy the POD soft/hard cover version?

    I'm feeling a "tough shit" on the tip of my tongue. Can anyone make a case to reinforce Iago's point? How common is it for consumer hardware limitations in other countries to lead to customer complaints that they should receive a "special" PDF so they can bypass the POD offering (or just save on shipping or whatever)? Is it reasonable to have a "Europe version"--A4 paper, full font embeds, PDF 1.3--and a "rest of modern world version"?

    Yes, this is an aside to the "make my PDF smaller" OP. The great advice above about proper art formatting and compression is going to make a MUCH bigger difference (usually--again, if you use score of megafonts, they will kill you more than 600 v 1200 dpi ZIP-compressed images).

    David
  • David,

    I'm talking about that problem arising in the context of getting a POD run of my books printed up. There's no customer to tell that their printer is shit; *I'm* the customer I'm talking about, and I'm talking about a problem that arose with some PDF sources for books problems that I've run into with Lulu, etc.

    There's no "is someone suffering because they have to download more megabytes" thing here. I'm not talking about selling the bloated PDF as a PDF download.
  • Posted By: David ArtmanCan anyone make a case to reinforce Iago's point?
    I can. Beast Hunters wouldn't print on Lulu's European printer. At all. Both embedding and pdf version were an issue. And it was quite frustrating, because I was trying to send books to someone so he could take them to a con in Germany. Several European orders fell through this way. It took going to PDF 1.3 to fix the problem.

    You can say "tough shit" to that, but if I'd known this in advance, you can bet your ass that I'd have made the PDF 1.3 from the very start. Now I DO have a different European version.
  • Posted By: xenopulsePosted By: David ArtmanCan anyone make a case to reinforce Iago's point?
    I can. Beast Hunters wouldn't print on Lulu's European printer. At all. Both embedding and pdf version were an issue. And it was quite frustrating, because I was trying to send books to someone so he could take them to a con in Germany. Several European orders fell through this way. It took going to PDF 1.3 to fix the problem.

    You can say "tough shit" to that, but if I'd known this in advance, you can bet your ass that I'd have made the PDF 1.3 from the very start. Now I DO have a different European version.

    Man, what a pain in the ass that was. I'm so sorry. :P
  • Nah, that one was totally in Lulu's court. Their documentation sucks, and their support didn't know this stuff either.
  • Oh, well OK then. I thought this thread was about direct-download PDF sales, not sending a PDF to a print provider (POD or not).

    Sure, yeah--fit whatever requirements your PP has, for localization. Hell, distill using the PostScript Printer Description (PPD) for the actual machine on which they will be running the book; do full font embedding (why not? You only send it once, not every sale); use a different page layout template prior to PDFing... whatever they need.

    But why would Levi give a rat's ass about file-size bloating for a PDF being sent to a PP/POD? I just assumed, from the OP, that we were talking about downloaded PDFs sold to end users... in which case I feel my previous point holds: tough shit, if you (end user) can't print out the PDF you bought in lieu of a POD version.

    ...Although, sure, I'd do the PDF as version 1.3, for the hell of it--I doubt that, for 99% of book designs, there's one iota of benefit gained from later PDF versions. IIRC, most of post-Acrobat 4.x (PDF v1.3) additions are for things like PDF forms and security.

    Anyhow... "just tryin' ta help!"
    David
Sign In or Register to comment.