On Sun, Jul 11, 2004 at 07:34:41PM +0300, Kfir Lavi wrote:
> Yedidyah Bar-David wrote:
> >Also imgtops, which most of the time will create smaller and faster
> >files. I did not try it myself, nor did I try to filter the output
> >through ps2pdf.
> tnx,
> i have used convert -append to make a 4 A4 letters that i scaned, to one 
> image file. This is good and very easy for the other side to get it.
> about the imgtops, isn't png's algorithm the same for all programs?! so 
> how it can compress it better?

You didn't ask for xxxtopng, but xxxtopdf. So what counts isn't png's
algorithm, but pdf's. While I didn't check pdf specifically, ps (which
behaves close in these things) has a few ways to keep trivial, non-
compressed bitmaps, and also has builtin the algorithms for some formats
(jpeg, and I think png/gif). But most programs, convert included, do not
know about this, and use only the trivial uncompressed bitmap. imgtops
knows about the "advanced" features of ps and uses them.

One more note: If it's for black/white (or blue/white (of a pen)) pages,
the best I can recommend (takes some work, but is very good) is the
following:
1. Scan in very high quality (600dpi or more, 8bit grayscale or 24bit).
2. Convert to pgm however you like (e.g. with convert).
3. Smooth with potrace. It's a very nice little program. Use '-g' to
output pgm.
4. Convert to pbm with pgmtopbm -threshold -value 0.5 (or change 0.5
if it's too light or too dark).
5. Convert to g4 tiff (very efficient black/white lossless compression)
with pnmtotiff -g4.
6. Collect to a single tiff with tiffcp.
7. Convert to pdf with tiff2pdf. Since pdf knows about g4, it won't take
time, be very small, and hopefully (depending on source) of very high
quality.

I already saw there is a gui for potrace, and maybe one day I'll try to
add this script to it.
-- 
Didi


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to