ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Bill McClain <wmcclain@salamander.com>
Subject: Re: Dithering (off-topic)
Date: Fri, 31 Oct 2003 06:37:31 -0600	[thread overview]
Message-ID: <20031031063731.12ddf19d.wmcclain@salamander.com> (raw)
In-Reply-To: <3FA245CC.30502@econ.muni.cz>

On Fri, 31 Oct 2003 12:21:48 +0100
Michal Kvasnicka <quasar@econ.muni.cz> wrote:

> I typeset a church bulleting. It is printed on a laserjet printer (600
> 
> dpi), and then copied on a copy machine. As for letters, all is right.
> 
> But figures (photos) are this way spoiled. I guess it would help
> either to force PDF to print the figures in some very low resolution
> (150 dpi), or (probably better) to dither the figures and include them
> in PNG (instead of ordinary JPEG). Can some of you tell me how to do
> it? I tried ImageMagick's convert to dither the photos, but outcomes
> were really poor. Is there some good free software for this (in the
> best case in Linux)? Or can I do it some way in PDF?

I suspect you need to halftone the photos before including them. All the
gray pixels must be converted into a pattern of black and white
equivalents.

On Linux you have the netpbm package which has everything you need. The
specific utility is pgmtopbm with various switches. There are other
utilities for converting to and from the netpbm file formats.

Here is an example of a pipeline I use to do several manipulations at
once:

   pnmscale -width=1950 pleiades.pnm | pnmsmooth -size 5 5 | pgmtopbm
-fs -value 0.5 | pnmtopng > pleiades.png

pnmscale: expand to a known size
pnmsmooth: try to obscure the halftone of the original photo
pgmtopbm: apply new halftone, -fs = "floyd-steinberg" halftoning
pnmtopng: convert to png for inclusion into pdf

The trouble with halftone images is that they are not
resolution-independent. You may have to adjust the image size
and parameters depending on your printer. Also, halftoned images do not
display well in some graphics programs, although acroread does a pretty
good job when they are included in pdf files.

-Bill
-- 
Sattre Press                                The King in Yellow
http://sattre-press.com/                 by Robert W. Chambers
info@sattre-press.com             http://kiy.sattre-press.com/ 

  reply	other threads:[~2003-10-31 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-31 11:21 Michal Kvasnicka
2003-10-31 12:37 ` Bill McClain [this message]
2003-11-04 13:34   ` Michal Kvasnicka
2003-11-04 15:48     ` Bill McClain
2003-10-31 15:17 ` Siep Kroonenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031031063731.12ddf19d.wmcclain@salamander.com \
    --to=wmcclain@salamander.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).