*
*
Home
Help
Login
Register
Welcome, Guest. Please login or register.
July 24, 2014, 04:23:15 AM

Login with username, password and session length
Forum changes: Editing of posts has been turned off until further notice.
Search:     Advanced search
46709 Posts in 5588 Topics by 13297 Members Latest Member: - Shane786 Most online today: 31 - most online ever: 429 (November 03, 2007, 04:35:43 AM)
Pages: [1]
Print
Author Topic: File size, compression and quality?  (Read 2529 times)
btrc
Member

Posts: 328


WWW
« on: January 21, 2008, 11:15:41 AM »

I'm working on an interactive character sheet for a project, and the sheet itself is going to be a full-page jpeg background image in a pdf. The image is color, has graphics and text. My query is for anyone who has tried to optimize such for home printing.

For any given final file size (say 1.5 megs) and a resolution of anywhere between 300 and 600 dpi, what do you think is the best compromise for print (not screen) quality? A 600dpi image with a lot of compression, a 300dpi image with much less compression, or some level in between? 600dpi gives me best quality text, but loads of compression artifacts on the image, while 300dpi gives me less sharp text (especially against a variable color background), but much less in the way of compression artifacts.

Obviously, I'm going to be trying out a lot of variations, but I just wanted to see if anyone else has ever had to work with this sort of problem.

Greg Porter
BTRC games
Logged
jerry
Member

Posts: 100


WWW
« Reply #1 on: January 21, 2008, 04:27:56 PM »

I'm working on an interactive character sheet for a project, and the sheet itself is going to be a full-page jpeg background image in a pdf. The image is color, has graphics and text. My query is for anyone who has tried to optimize such for home printing.

It's a pain. Is there a reason that the text has to be part of the jpeg? If you can move the text out of the JPEG and into the PDF (that is, use text instead of images to display the text) that will make optimizing the JPEG much easier.

JPEG is designed for photographs (or photograph-style images). It does poorly on images with few colors and sharp lines, such as text.

If I absolutely have to pre-render text into an image, I'll try hard to use PNG instead of JPG--which means using cartoon-style imagery (that is, few colors and sharp edges) if I need to keep file sizes down.

So short answer, it would probably help to see an example of the imagery you're trying to use.

Jerry
Logged

Jerry
Gods & Monsters
http://www.godsmonsters.com/
btrc
Member

Posts: 328


WWW
« Reply #2 on: January 22, 2008, 12:47:46 PM »

Jerry, the image in question is the last page at:

www.btrc.net/pub/vq04.pdf

As a character sheet, most of the program/user-entered info will be text in Acrobat, and will print just fine using the embedded fonts. However, the character sheet has text of its own, some of which uses photoshop effects that Acrobat can't duplicate. I believe the background image in the current file is a 600dpi high compression jpeg.

Also, for importing page backgrounds like this, the file format has to be pdf, though I can generate that pdf from just about anything and apply jpeg compression to it for the final result.

Greg
BTRC
Logged
Paul Czege
Acts of Evil Playtesters
Member

Posts: 2447


WWW
« Reply #3 on: January 22, 2008, 01:47:48 PM »

Hey Greg,

That's a gorgeous sheet.

I've never done this...but why not achieve your text effects in Photoshop, and then export the text separately from the background as 600 dpi png image with transparency, placing it over the background in your pdf, which you've saved as a 300 dpi png (to achieve fewer compression artifacts)?

Paul
Logged

"[My Life with Master] is anything but a safe game to have designed. It has balls, and then some. It is as bold, as fresh, and as incisive  now as it was when it came out." -- Gregor Hutton
jerry
Member

Posts: 100


WWW
« Reply #4 on: January 22, 2008, 05:55:45 PM »

What Paul said: if it has to be images, use software that supports layers, and export the layers to the appropriate format; PNG for things that can't compress without losing quality, and JPEG for things that can. (If it has to have an alpha channel, which it will if it isn't the bottom layer, it will need to be PNG also.)

Judging from what you've done, the software you're using already supports layers, so all you have to do is move things into separate layers. But if not, Photoshop and Illustrator both support layers, as do the free GIMP and Inkscape. (Just remember that GIMP doesn't support CMYK, if that's a deal-breaker for you.)

Jerry
Logged

Jerry
Gods & Monsters
http://www.godsmonsters.com/
David Artman
Member

Posts: 606

Designer & Producer


WWW
« Reply #5 on: January 23, 2008, 12:37:54 PM »

Out of curiosity, why not use ZIP compression on the art, and make it whatever format you want (ex: BMP or TIF)? It's lossless compression which will still get a lot done for your sheet, as it's got long strips of identical color, making "white space" compression efficient.

As for home printing, I'd suggest 600dpi. If you're going for pro printing, I'd up it to something between 1200 and 2400 dpi (ask your web press provider for their screen lines, to calculate the best maximum).

As for file size... what, you want cake with that, too? It's the age-old adage, rewrit:
Accurate, On Time, Under Budget: Pick Two
(Small File Size, High Quality Art, No Use of Layers: Pick Two)
David
Logged

Designer - GLASS, Icehouse Games
Editor - Perfect, Passages
btrc
Member

Posts: 328


WWW
« Reply #6 on: January 25, 2008, 06:06:32 AM »

Good questions/comments. Answers (sort of):

1) Acrobat does not support transparency as far as I know. So, I can't have an image layer and a text layer. That was a good idea, though. Also, the text layers on the image interact with the background texture, so I'm not sure separate layers would look that good. I have to live with no text effects for the user-modified bits, but they really do help the "look" for the ornamentation on the rest of the sheet. And, the background image has to be -in- the final pdf. I can't just use an external file reference.

2) The file you see is simply a pdf that has a bunch of Acrobat form fields and buttons on top of it for the user-adjustable bits. I can adjust the underlying pdf image without adjusting the overlying form fields. This lets me experiment with different compression/resolution settings without having to redo the program coding, but it is not really "layers" in the sense of photoshop layers. The two layers do not interact in any way. The background image has to be a pdf, rather than a png or other format. Now, I can save as a pdf in photoshop with options that preserve the fonts and vector data. I've done so and it looks freaking gorgeous. But it also takes up tens of megabytes of space, since much of the original image has vector effects (all those fancy shapes with gradients, etc.). But, that does give me an idea. I'll have to go into the original image, flatten out all the vector effects except for the fonts and try to save it as a "font-preserved" pdf and see what the size looks like.

3) The image saved as a zip compressed pdf is significantly larger than a jpeg compressed one. Mainly because the sheet has so much detail, there are no big image blocks where a large file savings can be had. Even the big white dial has a subtle texture to it. I'm probably stuck with a lossy compression scheme.

4) Since all the coding for the character generation is Acrobat-dependent, I have to use Acrobat rather than some other program. If it were just a question of file quality, I'd have any number of options. But this has to work in Acrobat, so I'm stuck with a either zipped or jpeg pdf as my file type.

FYI, the source image is a 350 megabyte Photoshop document that takes up well over a gig of memory when opened. For instance, each one of those brass pieces is an effect that takes six layers to accomplish, the wood background is a single 600dpi color image, and I have an entire subset of layers just for those little nails holding the brass plates to the wood. So, getting the file as small as I have is a major accomplishment. I just want more...;)

Sorry if it sounds like I'm just shooting down a bunch of good suggestions. I'm just constrained by the fact I sell pdf downloads, so everything has to be the right shape peg to fit into that hole.

Greg
BTRC

P.S. If you've played with the questions page to make a character using that sheet, consider it as a possible model for your games. I managed to make character generation a (hopefully) intriguing Q & A process, automated it and made it work with what is essentially a point-based rpg (EABA). But, there is no reason it couldn't work with other types of rpg, and the algorithms I used could be done manually in a conventionally printed rpg (answer a dozen questions about your PC, and the answers make the man...). It's kind of cool to say "this is who I am", and then see the character that comes from the answers to your questions. I'm still tweaking the parameters, but I like the overall results so far.

And if anyone reading this is into downloaded games, I'd be happy to give you pointers for creating your own Q & A system. The coding isn't that much of pain once you figure out what you're doing.







Logged
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
Oxygen design by Bloc
Valid XHTML 1.0! Valid CSS!